Fix test failures on Windows related to path separators
This commit is contained in:
parent
79ec03f3e5
commit
4792297702
9 changed files with 100 additions and 65 deletions
2
lib/fingerprints.test.js
generated
2
lib/fingerprints.test.js
generated
|
|
@ -137,7 +137,7 @@ function testResolveUriToFile(uri, index, artifactsURIs) {
|
|||
// should generally always be the case so this is fine.
|
||||
const cwd = process.cwd();
|
||||
const filepath = __filename;
|
||||
t.true(filepath.startsWith(`${cwd}/`));
|
||||
t.true(filepath.startsWith(cwd + path.sep));
|
||||
const relativeFilepath = filepath.substring(cwd.length + 1);
|
||||
// Absolute paths are unmodified
|
||||
t.is(testResolveUriToFile(filepath, undefined, []), filepath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue