Questions tagged [jest-junit]

A Jest reporter that creates compatible junit xml files

jest-junit

jest-junit is used together with the Jest JavaScript testing framework for creating xUnit compatible test reports.

Homepage: https://github.com/jest-community/jest-junit#readme

9 questions
12
votes
1 answer

Override jest-junit default output location?

How can I override the default output directory and file name jest-junit? I would like to customise the output configuration of output when using Jest, but it still ends up in the default location, i.e. ./junit.xml in the project root folder. My…
matsev
  • 32,104
  • 16
  • 121
  • 156
2
votes
1 answer

How to override the default jest-junit output file name - junit.xml

I am running a test using jest-junit and I want to change the default name of the output file which is junit.xml. I don't want to specify the outputname in the package.json or jest.config but instead I want to specify it in the ci something like npx…
2
votes
0 answers

Jest coverage data not showing in report

I'm trying to get test results and code coverage data after running jest tests. The resulting file contains the results of the tests, but no coverage data. I'm using jest-junit as my reporter. Here's what's in my package.json: "scripts": { …
LoneWolfPR
  • 3,978
  • 12
  • 48
  • 84
1
vote
0 answers

Setting up jest report in gitlab ci

Can you tell me how can I set up the jest-junit reporter? Expected behavior: Appearances on the page of the merge request description of errors. Real behavior: when it crashes, jobs are just red icons. script: - yarn install - yarn add --dev…
Dmitry Ten
  • 11
  • 1
1
vote
0 answers

What is the best way to output the mounted DOM's HTML when a React Jest test fails?

I am using jest-junit to output the contents of the failed tests into an XML file. I would like to also add a snapshot of the mounted component at time of failure to the contents of the failure. I am open to using something other than jest-junit to…
0
votes
1 answer

Cobertura page is empty/unknown after deploying to Gitlab's pages

To run the test locally, I use this: "test-ci": "jest --runInBand webapp/test/ivw --config ./jest.config.js --watchAll=false", In the terminal, I have the coverage report fine, and this also generates de Cobertura page: I have 2 stages in my…
Dani
  • 3,128
  • 2
  • 43
  • 91
0
votes
0 answers

How to create code coverage reports for React with jest Junit?

I'm working on a React typescript project and I want to generate a results of the tests and coverage as an xml file in project root. I have installed jest-junit and jest-junit-reporter. But unfortunately, I'm unable to generate a coverage…
0
votes
1 answer

Jest, command not found on GitLab

I'd like to execute my unit tests using JEST on GITLAB, but it seeem's not working. It works on my local machine but not on GitLab. The entire code of .gitlab-ci.yml : image: node:16 cache: paths: - node_modules install: stage: build …
tonymx227
  • 5,293
  • 16
  • 48
  • 91
0
votes
1 answer

Display jest warning as a warning in the Azure DevOps pipeline build results page

We have an Azure DevOps pipeline which uses self hosted Windows agents with Azure DevOps server 2019. The pipeline runs our front-end tests. For this we use the following command line to run the tests: npm run jest -- --ci --reporters=default…
Andrew
  • 585
  • 1
  • 7
  • 17