Coder Social home page Coder Social logo

Comments (12)

zeevrosental avatar zeevrosental commented on May 26, 2024 1

if it helps, i noticed that no report is generated if jest is running with --forceExit.

it seems that it closes before the report is created.

from jest-html-reporter.

Hargne avatar Hargne commented on May 26, 2024

I will have a look at it ASAP!

from jest-html-reporter.

RobertGary1 avatar RobertGary1 commented on May 26, 2024

Is it an option to use the synchronous I/O calls in nodeJs? Not sure what version of NodeJs introduced them.

from jest-html-reporter.

Hargne avatar Hargne commented on May 26, 2024

I'm pretty sure it's been possible for a long time to do synchronous calls with fs (correct me if I'm wrong). I'm unsure if that's the solution in this case though. It is a little weird as I haven't heard this from anyone else using the plugin.
What version of Node are you using, by the way?

from jest-html-reporter.

RobertGary1 avatar RobertGary1 commented on May 26, 2024

I'm using node.js v8.9.1

from jest-html-reporter.

Hargne avatar Hargne commented on May 26, 2024

I have been trying to reproduce this issue, but without any luck. I'm wondering if there might be something related to the structure of the project that you are working on that causes this issue, since there haven't been any reported issues where the reports haven't been generated up until now.

Theoretically, the asynchronous method createReport should not be aborted just because Jest has initialized prior to it finishing. This is due to the fact that Jest expects the testResultsProcessor (this module) to instantaneously return back the test result (which is done at the end of index.js).

Would you mind attempting to debug what may cause this issue to occur and post any findings here?

Thanks!

from jest-html-reporter.

Hargne avatar Hargne commented on May 26, 2024

Closing this for now. Re-open if you still think it is a relevant issue.

from jest-html-reporter.

zeevrosental avatar zeevrosental commented on May 26, 2024

i think this is still a problem. other reporters are not creating this problem(junit reporter).

from jest-html-reporter.

Hargne avatar Hargne commented on May 26, 2024

Is is possible to provide more details of the environment you ran the test on (together with --forceExit)? Jest version etc.

I did a test in this project with --forceExit enabled and the test report was successfully generated.

from jest-html-reporter.

Hargne avatar Hargne commented on May 26, 2024

There is a potential fix for this issue in v2.0.0 - see #33

from jest-html-reporter.

zeevrosental avatar zeevrosental commented on May 26, 2024

from jest-html-reporter.

Hargne avatar Hargne commented on May 26, 2024

@zeevrosental v2.0.0 has now been released. I will mark this issue as resolved for now.

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.