Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage for coercing scalars. #342

Merged
merged 3 commits into from
Jul 13, 2018

Conversation

jjeffery
Copy link
Contributor

Added tests for coerceInt, coerceFloat and coerceBool.

Found some missing case statements during testing.

Added tests for coerceInt, coerceFloat and coerceBool. Found some missing case statements during testing.
@coveralls
Copy link

coveralls commented Jun 28, 2018

Coverage Status

Coverage increased (+0.7%) to 80.75% when pulling 9c4c6cd on jjeffery:coerce-scalars into 796d223 on graphql-go:master.

@@ -153,6 +191,9 @@ func coerceFloat(value interface{}) interface{} {
case *string:
return coerceFloat(*value)
}

// TODO: check the graphql spec: coerceInt returns nil if it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris-ramon
Copy link
Member

LGTM 👍 — thanks a lot @jjeffery !

@chris-ramon chris-ramon merged commit 706b836 into graphql-go:master Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants