isaacs / isexe

Minimal module to check if a file is executable.
ISC License
48 stars 17 forks source link

test fails on windows #13

Open BurtHarris opened 7 years ago

BurtHarris commented 7 years ago
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\Burt_>cd \code\isexe

C:\code\isexe>npm i
up to date in 1.345s

C:\code\isexe>npm test

> isexe@2.0.0 test C:\code\isexe
> tap test/*.js --100

module.js:487
    throw err;
    ^

Error: Cannot find module 'C:\Users\Burt_\.node-spawn-wrap-2296-ee88a1276edb\node.EXE'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
test/basic.js ......................................... 0/1
  not ok test/basic.js
    timeout: 240000
    file: test/basic.js
    command: 'C:\Program Files\nodejs\node.EXE'
    args:
      - test/basic.js
    cwd: 'C:\code\isexe'
    exitCode: 1

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

  0 passing (131.621ms)
  1 failing

----------|----------|----------|----------|----------|----------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files |  Unknown |  Unknown |  Unknown |  Unknown |                |
----------|----------|----------|----------|----------|----------------|
BurtHarris commented 7 years ago

And I thought fixing #12 was going to be easy...

Gudahtt commented 6 years ago

It looks like this failure was caused by https://github.com/tapjs/node-tap/issues/373 which itself was caused by a bug in spawn-wrap. Updating to a newer version of tap should fix the issue.

It looks any version of tap > v10.7.1 should guarantee that the version of spawn-wrap used includes this particular bug fix. We'd might as well update to v12 though I suppose.