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

Testing Tools - Provide a verbose message when the error should be thrown #2221

Open
Dmitry-Ostashev opened this issue Jan 25, 2022 · 0 comments

Comments

@Dmitry-Ostashev
Copy link

Is your feature request related to a problem? Please describe.
I'm testing my aggregate using with the Testing Tools. If a command executed without an expected error, I can see the following message:

expected an error, but received no error received.

It's unclear what error should be thrown. Besides, the stack trace does not point to the particular line in my test file:

    expected an error, but received no error received

      at node_modules/@resolve-js/testing-tools/lib/flow/aggregate/should-throw.js:25:21
      at _callee$ (node_modules/@resolve-js/testing-tools/lib/flow/aggregate/make-test-environment.js:124:48)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:63:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:294:22)
      at Generator.next (node_modules/regenerator-runtime/runtime.js:119:21)
      at asyncGeneratorStep (node_modules/@resolve-js/testing-tools/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/@resolve-js/testing-tools/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)

Describe the solution you'd like
I want to see a message like in case if an incorrect error was thrown:

expected error "ForbiddenError: the user is not an organization owner or administrator. ", but received no error received.

Describe alternatives you've considered
Put each command call into a separate test.

Additional context

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

No branches or pull requests

1 participant