diff --git a/src/which.js b/src/which.js index 1591ebeb..cc497384 100644 --- a/src/which.js +++ b/src/which.js @@ -25,6 +25,8 @@ function splitPath(p) { return p ? p.split(path.delimiter) : []; } +// Tests are running all cases for this func but it stays uncovered by codecov due to unknown reason +/* istanbul ignore next */ function isExecutable(pathName) { try { // TODO(node-support): replace with fs.constants.X_OK once remove support for node < v6 diff --git a/test/which.js b/test/which.js index 1f3fbe7d..f81d9e0e 100644 --- a/test/which.js +++ b/test/which.js @@ -90,8 +90,7 @@ test('None executable files does not appear in the result list', t => { t.truthy(resultForWhichA); t.truthy(resultForWhichA.length); t.not(resultForWhich.toString(), matchingFile); - // TODO(node-support): this can be used starting from node@6: t.falsy(resultForWhichA.includes(matchingFile)) - t.not(resultForWhichA[0], matchingFile); + t.is(resultForWhichA.indexOf(matchingFile), -1); process.env.PATH = pathEnv; });