Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
jest-allure2-reporter
Advanced tools
Before you start, make sure you have Allure CLI installed.
Your project should have jest
installed. The minimum supported version is 27.x
.
Run in your project:
npm install --save-dev jest-allure2-reporter
Edit your jest.config.js
:
module.exports = {
// ...
reporters: [
'default',
+ 'jest-allure2-reporter',
],
};
By default, the reporter will write the results to allure-results
directory. You can change this by setting the resultsDir
option:
module.exports = {
// ...
reporters: [
'default',
[
'jest-allure2-reporter',
+ { resultsDir: 'my-results-dir' },
],
],
};
Below is a list of all the available options:
Property | Type | Default | Description |
---|---|---|---|
errorsAsFailedAssertions | boolean | false | Treat thrown errors as failed assertions. By default, the reporter distinguishes between failed assertions and thrown errors. The former are reported as FAILED tests, the latter as BROKEN tests. |
getEnvironmentInfo | function or boolean | true | Can be customized with an async function to extract environment information from the test environment. By default, the environment information is extracted from the process.env object. Use false to disable environment information. |
overwriteResultsDir | boolean | true | Whether the reporter should delete the results directory before running tests. |
packageName | string | require('./package.json').name | Add an extra label to each test case with the package name. Helpful when running tests from multiple packages in a monorepo. |
resultsDir | string | <rootDir>/allure-results | Path to the directory where the report will be generated. |
Run your tests with jest
as usual and then view the results:
allure serve
If you use a custom resultsDir
, you should specify it in the allure serve
command, e.g.:
allure serve your-results-dir # if you use a custom `resultsDir`
If you want to generate a static report, e.g., for CI, run:
allure generate
For more information, see the Allure CLI documentation.
See CONTRIBUTING.md.
FAQs
Idiomatic Jest reporter for Allure Framework
The npm package jest-allure2-reporter receives a total of 3,017 weekly downloads. As such, jest-allure2-reporter popularity was classified as popular.
We found that jest-allure2-reporter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.