@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.
Requirements
Jest
v29.5.0+
Node.js
v18.20.4+
Setup
Add the reporter to Jest configuration:
or set the --reporters
option when running the jest
The reporter saves the test results in a temporary folder named .currents/[timestamp]-[uuidv4()]
.
We recommend adding.currents
to .gitignore
Usage
Configure the reporter
Run the tests
npx jest
Use
currents
from @currents/cmd package to upload the results
Example:
Configuration
recordKey
string
The organization's record key
CURRENTS_RECORD_KEY
projectId
string
The target project
CURRENTS_PROJECT_ID
reportDir
string
Test results directory
CURRENTS_REPORT_DIR
.currents/[timestamp]-[uuidv4()]
Troubleshooting
Set DEBUG=currents*
before running jest
to obtain detailed information about the reporter execution process.
Last updated