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

Better subscription test helpers #96

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jtomaszewski
Copy link

@jtomaszewski jtomaszewski commented Nov 16, 2022

Solves absinthe-graphql/absinthe#942 .

Implements new test helpers that allow to start a graphql subscription and assert/refute its' updates using an easy-to-use syntax.

Docs for the old helpers have been removed, as they shouldn't be needed anymore. (They're still left as they're used internally by the new helpers, and because existing projects may use them.)

Let me know if anything needs to be improved before this can be merged.

P.S. This work here was inspired by https://github.com/gen1321/anise and https://gist.github.com/wpiekutowski/8e4de4b9c8253584765ca0106c190dad - thank you @gen1321 and @wpiekutowski !

Jacek Tomaszewski added 2 commits November 16, 2022 20:00
…est importing instead

Using it isn't really needed for any functions of this module. Not using it also allows for testing several schemas in a single test file, if that's ever needed.
@jtomaszewski jtomaszewski force-pushed the better-subscription-test-helpers branch from e8b5ce0 to e0090e0 Compare November 16, 2022 19:08
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.

1 participant