jest-plugin-must-assert
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -8,2 +8,6 @@ /** | ||
test('synchronous failure', () => { | ||
expect(true).toBe(false); | ||
}); | ||
test('missed runtime assertion', () => { | ||
@@ -56,2 +60,6 @@ const unused = () => expect(true).toBe(true); | ||
it('synchronous failure', () => { | ||
expect(true).toBe(false); | ||
}); | ||
// https://github.com/facebook/jest/issues/8297 | ||
@@ -58,0 +66,0 @@ it('unreturned promise assertions', () => { |
{ | ||
"name": "jest-plugin-must-assert", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Jest plugin for async tests", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,7 +8,7 @@ # `jest-plugin-must-assert` | ||
Asynchronous tests could be challenging to get _right_, particulrary for junior | ||
Asynchronous tests could be challenging to get _right_, particularly for junior | ||
developers or engineers new to async JavaScript. The most common mistake is an async | ||
test which does not fire any assertions, either due to logic or even syntax errors. | ||
Static analysis(linters) gets close to pointing out the issues, but is not enough to catch logic mistakes. | ||
For this, we require a runtime check that _some_ assertion was ran during the test. | ||
Static analysis (linters) gets close to pointing out the issues, but is not enough to catch logic mistakes. | ||
For this, we require a runtime check that _some_ assertion was run during the test. | ||
@@ -98,4 +98,4 @@ [Jest, unfortunately, has no "failWithoutAssertions" configuration options, so this plugin aims to remedy that.](https://github.com/facebook/jest/issues/2209) | ||
There is some performance implications of using this plugin as it does add a bit of | ||
There are some performance implications of using this plugin as it does add a bit of | ||
overhead, but from testing it's a trivial increase. This plugin has been tested | ||
within a project with 1600+ test suites and over 10k individual tests, with only a negligble slow-down. | ||
within a project with 1600+ test suites and over 10k individual tests, with only a negligible slow-down. |
@@ -73,4 +73,5 @@ const StackUtils = require('stack-utils'); | ||
logger.warn(`${e.message}\n\n${stack.clean(e.stack)}`); | ||
return false; | ||
} | ||
return false; | ||
throw e; | ||
}, | ||
@@ -77,0 +78,0 @@ onInvokeTask(delegate, current, target, task, applyThis, applyArgs) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16224
399