Giter Club home page Giter Club logo

Comments (5)

pmoleri avatar pmoleri commented on September 4, 2024

Hi @gadepallavi your error points to a missing "stats" property but I can't find the root cause for that. Could you describe your setup?
node, npm and mocha versions?

from mocha-trx-reporter.

gadepallavi avatar gadepallavi commented on September 4, 2024

Hello, please find the requested infomration below:

Versions:
node: v12.16.1
npm: 6.14.3
mocha: ^5.2.0

Describe the steps:

  1. Installed the mocha-trx-reporter version (^3.2.3)
  2. Updated the script to use the mocha-trx-reporter as display below:
    "npm run build && mocha --reporter mocha-trx-reporter --reporter-options output=./TestResults/test-result.trx Output/**/*.test.js"
  3. After adding above statement, when I run my E2E tests it, chrome broweser launch and it executes the tests, however at the end of the test gives me mentioned error as "TypeError: Cannot read property 'start' of undefined" in file "\node_modules\mocha-trx-reporter\lib\trx.js" line 83" and I dont see the ".trx" file generated for it.

Please let me know if you need any details.

Regards,
Pallavi

from mocha-trx-reporter.

pmoleri avatar pmoleri commented on September 4, 2024

Thanks for the info. I think that the problem is a mismatch between the mocha version included in mocha-trx-reporter and your project's mocha version.

Now I changed mocha dependency to be a peer-dependency, which I think it's the correct approach. With this change the reporter will work with your mocha version instead of bundling its own.

It's not yet published to npm, you can try the fix by installing it from github:

npm install "github:Infragistics/mocha-trx-reporter#23b98b433ad11dd70b05ef265f4d989afa95637a"

Please let me know if this works for you.

from mocha-trx-reporter.

gadepallavi avatar gadepallavi commented on September 4, 2024

Hello,

I tried the fix using the commands given and it is working for me. Thank you. Please let me know when it is available on NPM and I will make the necessary changes on my end.

Regards,
Pallavi

from mocha-trx-reporter.

pmoleri avatar pmoleri commented on September 4, 2024

The fixed version has been published to npm, you can now install it as standard dep:
npm install --save-dev [email protected]

from mocha-trx-reporter.

Related Issues (11)

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.