Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel-tap is not supporting tap command line options --cov #7

Open
paladugu18 opened this issue Sep 21, 2017 · 1 comment
Open

Babel-tap is not supporting tap command line options --cov #7

paladugu18 opened this issue Sep 21, 2017 · 1 comment

Comments

@paladugu18
Copy link

paladugu18 commented Sep 21, 2017

When i use the code coverage option with babel-tap am seeing this error:

babel-tap test.js --cov
module.js:491
    throw err;
    ^

Error: Cannot find module '/Users/../.node-spawn-wrap-15411-b2267dadd6af/babel-node.js'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Function.Module.runMain (module.js:609:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/babel-tap/node_modules/babel-cli/lib/_babel-node.js:154:22)
    at Module._compile (module.js:573:30)
    at Module.replacementCompile (/usr/local/lib/node_modules/babel-tap/node_modules/nyc/node_modules/append-transform/index.js:58:13)
    at module.exports (/usr/local/lib/node_modules/babel-tap/node_modules/nyc/node_modules/default-require-extensions/js.js:8:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/babel-tap/node_modules/nyc/node_modules/append-transform/index.js:62:4)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
test.js ............................................... 0/1
  not ok test.js
    timeout: 240000
    file: test.js
    command: /usr/local/lib/node_modules/babel-tap/node_modules/babel-cli/bin/babel-node.js
    args:
      - test.js
    cwd: /Users/../Documents/code-katas/babel-tap
    exitCode: 1

total ................................................. 0/1


  0 passing (1s)
  1 failing

----------|----------|----------|----------|----------|----------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files |  Unknown |  Unknown |  Unknown |  Unknown |                |
----------|----------|----------|----------|----------|----------------|

Looks like node-tap/bin/run.js is spawning child process when we run with --cov option and for some reason, it is unable to find the spawned processes.

@andrei-cocorean
Copy link

I had the same problem and fixed it by running:
tap --nyc-arg='--require=babel-register' --cov test.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants