Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@rwx-research/jest-circus
Advanced tools
jest-circus
The next-gen test runner for Jest
Circus is a flux-based test runner for Jest that is fast, maintainable, and simple to extend.
Circus allows you to bind to events via an optional event handler on any custom environment. See the type definitions for more information on the events and state data currently available.
import {Event, State} from 'jest-circus';
import {TestEnvironment as NodeEnvironment} from 'jest-environment-node';
class MyCustomEnvironment extends NodeEnvironment {
//...
async handleTestEvent(event: Event, state: State) {
if (event.name === 'test_start') {
// ...
}
}
}
Mutating event or state data is currently unsupported and may cause unexpected behavior or break in a future release without warning. New events, event data, and/or state data will not be considered a breaking change and may be added in any minor release.
Note, that jest-circus
test runner would pause until a promise returned from handleTestEvent
gets fulfilled. However, there are a few events that do not conform to this rule, namely: start_describe_definition
, finish_describe_definition
, add_hook
, add_test
or error
(for the up-to-date list you can look at SyncEvent type in the types definitions). That is caused by backward compatibility reasons and process.on('unhandledRejection', callback)
signature, but that usually should not be a problem for most of the use cases.
Note: As of Jest 27,
jest-circus
is the default test runner, so you do not have to install it to use it.
Install jest-circus
using yarn:
yarn add --dev jest-circus
Or via npm:
npm install --save-dev jest-circus
Configure Jest to use jest-circus
via the testRunner
option:
{
"testRunner": "jest-circus/runner"
}
Or via CLI:
jest --testRunner='jest-circus/runner'
FAQs
Unknown package
The npm package @rwx-research/jest-circus receives a total of 611 weekly downloads. As such, @rwx-research/jest-circus popularity was classified as not popular.
We found that @rwx-research/jest-circus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.