Skip to content

test: add more hook tests #133

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 3 commits into from
Jan 7, 2019
Merged

Conversation

smyrick
Copy link
Contributor

@smyrick smyrick commented Jan 4, 2019

Add unit test coverage for SchemaGeneratorHooks

@smyrick smyrick added the changes: patch Changes require a patch version label Jan 4, 2019
@codecov-io
Copy link

codecov-io commented Jan 4, 2019

Codecov Report

Merging #133 into master will increase coverage by 2.68%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #133      +/-   ##
============================================
+ Coverage     93.07%   95.75%   +2.68%     
  Complexity      154      154              
============================================
  Files            47       50       +3     
  Lines           491      495       +4     
  Branches         96       99       +3     
============================================
+ Hits            457      474      +17     
+ Misses            8        5       -3     
+ Partials         26       16      -10
Impacted Files Coverage Δ Complexity Δ
.../com/expedia/graphql/hooks/SchemaGeneratorHooks.kt 100% <100%> (+7.69%) 0 <0> (ø) ⬇️
...pedia/graphql/generator/types/ObjectTypeBuilder.kt 94.73% <0%> (ø) 2% <0%> (ø) ⬇️
...xpedia/graphql/generator/types/QueryTypeBuilder.kt 100% <0%> (ø) 6% <0%> (+1%) ⬆️
...a/graphql/generator/extensions/kClassExtensions.kt 100% <0%> (ø) 0% <0%> (ø) ⬇️
...dia/graphql/generator/types/MutationTypeBuilder.kt 100% <0%> (ø) 6% <0%> (+1%) ⬆️
...phql/generator/extensions/graphQLTypeExtensions.kt
...ia/graphql/exceptions/InvalidQueryTypeException.kt 100% <0%> (ø) 1% <0%> (?)
...xceptions/InvalidSchemaDirectiveWiringException.kt 100% <0%> (ø) 1% <0%> (?)
.../graphql/generator/extensions/graphQLExtensions.kt 100% <0%> (ø) 0% <0%> (?)
...graphql/exceptions/InvalidMutationTypeException.kt 100% <0%> (ø) 1% <0%> (?)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 203dece...239b5ce. Read the comment docs.

@smyrick smyrick requested a review from a team January 4, 2019 03:36
@smyrick
Copy link
Contributor Author

smyrick commented Jan 4, 2019

I cannot cover the on failure branch because that is technically unreachable code since we expect an exception to be thrown.

I think a better predicate is this #134

@dariuszkuc dariuszkuc merged commit d6159d5 into ExpediaGroup:master Jan 7, 2019
@smyrick smyrick deleted the hooks-test branch January 7, 2019 17:34
dariuszkuc pushed a commit to dariuszkuc/graphql-kotlin that referenced this pull request Aug 5, 2022
* test: add more hook tests

* fix: drop test helper

* Delete DataFetcherExecutionPredicateTest.kt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: patch Changes require a patch version
Development

Successfully merging this pull request may close these issues.

3 participants