mocha: browserify breaks at require('./lib-cov/mocha')
mocha/index.js
:
module.exports = process.env.COV
? require('./lib-cov/mocha')
: require('./lib/mocha');
Error: module "./lib-cov/mocha" not found from "/Volumes/work/Projects/yaas/node_modules/mocha/index.js"
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 27 (11 by maintainers)
Commits related to this issue
- Issue #880: browserify compatibility - Add: browser property to package.json specifying lib/mocha_browserify.js - Fix: require calls in the browser mocha.js — committed to michaelBenin/mocha by michaelBenin 10 years ago
- Add browser script option to package.json This will tell any browserify project to package the browser version of mocha and not the Node version. Fixes issue #880 This will only cover the JavaScrip... — committed to sukima/mocha by sukima 10 years ago
- We have to use mocha from the CDN, browserify cant build mocha see https://github.com/mochajs/mocha/issues/1316 https://github.com/mochajs/mocha/issues/880 — committed to tddbin/tddbin-frontend by deleted user 9 years ago
- full browserification support; closes #880 — committed to boneskull/mocha by boneskull 8 years ago
- full browserification support; closes #880 — committed to boneskull/mocha by boneskull 8 years ago
- full browserification support; closes #880 — committed to boneskull/mocha by boneskull 8 years ago
- full browserification support; closes #880 — committed to boneskull/mocha by boneskull 8 years ago
@SonofNun15 It’s all in the makefile. when running
test-cov
it uses the jscoverage tool to instrument the code intolib-cov
- then mocha runs with the COV environment variable set to report out coverage for the instrumented code… The initial discussion is in #5 and d4666c2 is the initial commit.@boneskull I see you added PR PLEASE – what’s the scope of a PR you’d accept? To switch coverage to something less obtrusive – or get
require('mocha')
under browserify working?I think this can be fixed by ignoring lib-cov/mocha, i.e. adding
"./lib-cov/mocha": false
to the browser field in package.json