c8: Integration tests sometimes failing

This is a weird issues, I’m not sure what’s going wrong… if it’s just me (I’m on Windows), or if it actually has something to do with integration tests

Sometimes the tests fail and sometimes they pass…

Here’s a screen grab where I run the same test command:

https://gfycat.com/DrearyCreamyGemsbuck

The two tests that are failing are:

  1. 'merges reports from subprocesses together'

    When it fails (see source for what’s expected) the actual output is:

    ,first
    
    second
    
    --------------------|----------|----------|----------|----------|-------------------|
    File                |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
    --------------------|----------|----------|----------|----------|-------------------|
    All files           |    94.12 |    73.08 |        0 |    94.12 |                   |
    bin                 |    83.72 |    57.14 |      100 |    83.72 |                   |
      c8.js             |    83.72 |    57.14 |      100 |    83.72 |... 22,40,41,42,43 |
    lib                 |    96.41 |    65.38 |      100 |    96.41 |                   |
      parse-args.js     |    97.47 |    44.44 |      100 |    97.47 |             55,56 |
      report.js         |    95.45 |    76.47 |      100 |    95.45 |       51,52,53,54 |
    test/fixtures       |    95.16 |    89.47 |        0 |    95.16 |                   |
      async.js          |      100 |      100 |      100 |      100 |                   |
      multiple-spawn.js |      100 |      100 |      100 |      100 |                   |
      normal.js         |    85.71 |       75 |        0 |    85.71 |          14,15,16 |
      subprocess.js     |      100 |     87.5 |      100 |      100 |                 9 |
    --------------------|----------|----------|----------|----------|-------------------|
    ,
    

    which differs in the last line (subprocess.js)

  2. 'omit-relative can be set to false'

    When it fails (see source for what’s expected) the actual output is:

    ,first
    
    second
    
    ,fs.js:115
        throw err;
        ^
    
    Error: EISDIR: illegal operation on a directory, read
        at Object.readSync (fs.js:491:3)
        at tryReadSync (fs.js:330:20)
        at Object.readFileSync (fs.js:367:19)
        at new CovScript (C:\...\c8\node_modules\v8-to-istanbul\lib\script.js:14:23)
        at module.exports (C:\...\c8\node_modules\v8-to-istanbul\index.js:4:10)
        at Object.keys.forEach (C:\...\c8\lib\report.js:65:22)
        at Array.forEach (<anonymous>)
        at Report._getCoverageMapFromAllCoverageFiles (C:\...\c8\lib\report.js:62:32)
        at Report.run (C:\...\c8\lib\report.js:31:22)
        at module.exports (C:\...\c8\lib\report.js:86:10)
    

    It throws an “EISDIR: illegal operation on a directory” error instead of the expected “ENOENT: no such file or directory”

Edit: I’m testing this with #26 checked out, but this issue seems to exist without it too.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@demurgos Yep, that PR seems to fix this. I’ve ran tests many times with it and they’re always passing 👍