Releases: ballercat/jest-plugin-must-assert
Expose stack task stack traces
This version includes a breaking API change
New Feature
New feature, add getStackTrace
to onInvokeTask
. This allows users to inspect the stack prior to blocking a task.
Breaking Change
taskType
and taskSource
have been replaced with a task
object in the onInvokeTask
API
Semver correction.
Version 2.1.0 breaks public API this is a correction to version 2.x
Expose stack task stack traces
New feature, add getStackTrace
to onInvokeTask
. This allows users to inspect the stack prior to blocking a task.
Fail tests with unhandled Promise rejections
This release comes with a major patch that may fail a larger portion of your tests.
- Any unhandled promise rejection during an async test will now fail a test. Example
test('unhandled promise rejections fail tests', () => {
Promise.resolve().then(() => {
throw new Error('oops');
});
return wait(() => {
expect(1).toBe(1);
});
});
With plugin versions prior to v2.0.0
the test above would pass. This brings the plugin inline with Jest behavior, which will fail the test above by default.
API Changes
ignoreStack[]
option can be used to control which parts of the stack(s) are printed by the plugin when alerting on ignored async tasks. This was previously undocumented.
Support jsdom environments
Patch to existing bootstrap to add support for JSDOM environments. Fixes issues with setTimeout family of functions not properly zoned.
New public apis:
jest-plugin-must-assert/jsdom
instead of just the defaultjest-plugin-must-assert
jest-plugin-must-assert/jsdom-munual
instead of just the default manual setupjest-plugin-must-assert/manual
Bugfix todo
v1.5.0 Bugfix todo issues