Skip to content

Add unit tests for isRequired predicates #1486

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

Merged
merged 1 commit into from
Aug 28, 2018
Merged

Add unit tests for isRequired predicates #1486

merged 1 commit into from
Aug 28, 2018

Conversation

Cito
Copy link
Member

@Cito Cito commented Aug 27, 2018

The two new predicates isRequiredArgument and isRequiredInputField did not yet have unit tests.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Member

@IvanGoncharov IvanGoncharov left a comment

Choose a reason for hiding this comment

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

@Cito Looks great 👍 Thanks a lot.

type: GraphQLString,
};
expect(isRequiredArgument(optArg1)).to.equal(false);
const optArg2 = {
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe add an empty line here to improve readability

@Cito
Copy link
Member Author

Cito commented Aug 27, 2018

Ok, added some empty lines.

@IvanGoncharov IvanGoncharov requested a review from mjmahone August 28, 2018 12:20
@mjmahone
Copy link
Contributor

This looks great! Thanks for adding the test.

@mjmahone mjmahone merged commit f474a4e into graphql:master Aug 28, 2018
@Cito Cito deleted the test-required-predicate branch August 30, 2018 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants