Git Product home page Git Product logo

Comments (2)

glenjamin avatar glenjamin commented on June 23, 2024

This is caused by having more than one mocha floating around.

Normally, base.js is loaded early enough to not be affected by all the monkey patching (https://github.com/glenjamin/mocha-multi/blob/master/mocha-multi.js#L6)

For some reason, your custom reportering (this one? https://github.com/sjonnet19/mocha-cobertura-reporter) declare mocha as a "dependency", when it should really be a "peerDependency".

This causes a second base.js to be loaded - which only happens after the tty stuff has fired.

The simplest fix would be to add | cat onto the end of your mocha command, so it's not a tty and this code-path gets skipped.

Unfortunately mocha has quite a bit of hidden state, so there's not a huge amount I can do here.

from mocha-multi.

carchrae avatar carchrae commented on June 23, 2024

Thanks for the explanation and easy fix, Glen. I suspect my fix above does not work correctly - and one of my reporters is using the additional base.js and not writing the output via mocha-multi.

I'm using a few different mocha reporters, and none of them declare the dependency correctly. Boo.

from mocha-multi.

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.