@currents/jest
Currents reporter for Jest
Currents reporter for Jest generates test results that for uploading to Currents.
The reporter stores the generated results in a temporary directory. Upload the generated results using a separate package @currents/cmd.
Setup
npm install @currents/jest @currents/cmd --save-devAdd the reporter to Jest configuration:
import type { Config } from "jest";
const config: Config = {
reporters: ["default", "@currents/jest"],
};
export default config;or set the --reporters option when running the jest
npx jest --reporters=@currents/jestThe reporter saves the test results in a temporary folder named .currents-report-[timestamp]-[uuidv4()].
Usage
Configure the reporter
Run the tests
npx jestUse
currentsfrom @currents/cmdpackage to upload the results
Example:
Configuration
reportDir
string
Test results directory
CURRENTS_REPORT_DIR
.currents-report-[timestamp]-[uuidv4]
Troubleshooting
Set DEBUG=currents* before running jest to obtain detailed information about the reporter execution process.
Last updated
Was this helpful?