Skip to content
This repository was archived by the owner on Dec 8, 2024. It is now read-only.
This repository was archived by the owner on Dec 8, 2024. It is now read-only.

Configuring istanbul with mocha #44

@dankohn

Description

@dankohn

Istanbul works flawlessly with jasmine-node, using the command: `istanbul cover jasmine-node test'

Is it possible to use istanbul with mocha, in a similar way. I get the following:

$ istanbul cover mocha -u exports -R spec

fs.js:684
  return binding.stat(pathModule._makeLong(path));
                 ^
Error: ENOENT, no such file or directory 'exports.js'
    at Object.fs.statSync (fs.js:684:18)
    at lookupFiles (/usr/local/share/npm/lib/node_modules/mocha/bin/_mocha:390:17)
    at spinner (/usr/local/share/npm/lib/node_modules/mocha/bin/_mocha:268:24)
    at Array.forEach (native)
    at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/mocha/bin/_mocha:267:6)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
No coverage information was collected, exit without writing coverage information

I tried using https://github.com/arikon/mocha-istanbul as the reporter but got a similar error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions