Coder Social home page Coder Social logo

Does not generate index.html/test report when there are failing test cases and `includeFailureMsg` = true about jest-html-reporter HOT 9 CLOSED

hargne avatar hargne commented on June 6, 2024 1
Does not generate index.html/test report when there are failing test cases and `includeFailureMsg` = true

from jest-html-reporter.

Comments (9)

avne31 avatar avne31 commented on June 6, 2024

kindly help me in this.i'm stuck at that point

from jest-html-reporter.

Hargne avatar Hargne commented on June 6, 2024

Hi,

Is it possible to provide with some more information on the issue?

  • Has it worked previously (prior to any new versions)?
  • Do you get any errors in your terminal specifically pointing to jest-html-reporter? If so, kindly post these here.
  • If possible, please share your jesthtmlreporter.config.json (and possibly the parts of jest.config.json that relates to this plugin)

Thanks!

from jest-html-reporter.

avne31 avatar avne31 commented on June 6, 2024

Hi Hargne,

I have not used jest-html-reporter in past. And I have not found any error related to jest-html-reporter.
Html report is generated when all test cases are passed but did not get the report for failure case.
I am using jest to run frisby specs and jest-html-reporter for test result reporting.

I have enabled the option 'includeFailureMsg: true' in package.json for failed cases.

package.json:

"name": "test", "jest": { "verbose": true, "testMatch": ["path"], "testResultsProcessor": "./node_modules/jest-html-reporter" }, "jest-html-reporter": { "pageTitle": "Your test suite", "outputPath": "test-report.html", "includeFailureMsg": true }, "dependencies": { "jest-html-reporter": "^2.3.0" }

Thanks.

from jest-html-reporter.

Hargne avatar Hargne commented on June 6, 2024

Have you configured Jest to use jest-html-reporter?

Within jest.config.js:

{
	"testResultsProcessor": "./node_modules/jest-html-reporter"
}

from jest-html-reporter.

avne31 avatar avne31 commented on June 6, 2024

I'm configuring jest in the package.json and didn't create the separate configuration file(jest.config.js).

the link I'm using:

https://www.npmjs.com/package/jest-html-reporter

from jest-html-reporter.

Hargne avatar Hargne commented on June 6, 2024

It's quite difficult to see the big picture of your project and why this would fail for you (I cannot reproduce the issue myself).

One thing you could attempt, is to replace the testResultsProcessor entry to the following:

"reporters": ["default", "./node_modules/jest-html-reporter"]

And then add the "executionMode": "reporter" within the jest-html-reporter configuration

from jest-html-reporter.

avne31 avatar avne31 commented on June 6, 2024

first of all, thanks for responding fast!

I did changes in the package.json file as you say but now, it only shows the result of failed cases.It doesn't show the result of passed cases.

package.json

{ "name": "test", "jest": { "verbose": true, "testMatch": [ "C:/Users/Desktop/__tests__/api/*_spec.js" ], "reporters": ["default", "./node_modules/jest-html-reporter"] }, "jest-html-reporter": { "pageTitle": "Your test suite", "outputPath": "test-report.html", "includeFailureMsg": true, "executionMode": "reporter" } }

from jest-html-reporter.

avne31 avatar avne31 commented on June 6, 2024

thanks for your help Hargne.

now my problem is resolved, it shows that I want.

from jest-html-reporter.

Hargne avatar Hargne commented on June 6, 2024

Great to hear!

from jest-html-reporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.