-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
The assertion module should signals failures through messages to the test runner #52033
Comments
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-stale
|
still applies |
This commit adds a top level assert.register() API to the test runner. This function allows users to define their own custom assertion functions on the TestContext. Fixes: nodejs#52033
This commit adds a top level assert.register() API to the test runner. This function allows users to define their own custom assertion functions on the TestContext. Fixes: nodejs#52033
This commit adds a top level assert.register() API to the test runner. This function allows users to define their own custom assertion functions on the TestContext. Fixes: #52033 PR-URL: #56434 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Pietro Marchini <[email protected]>
What is the problem this feature will solve?
The assertion module signals failures via exceptions. This may causes some subtle issues during program testing, since the "exception channel" is also used by the program under test which may catch the exceptions generated by failing assertions resulting in weird test behavior.
test passes...
What is the feature you are proposing to solve the problem?
When in a test runner context provide the assertion module via the testContext object:
and signal the failures via messages between testContext and assert methods.
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: