Skip to content

Commit

Permalink
Fix resolveRelative utility to work on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Aug 21, 2022
1 parent 35a07a5 commit 3bfc58c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/util/resolveRelative.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from 'path';
import { posix as path } from 'path';

const PARENT_DIR = '..' + path.sep;

Expand Down Expand Up @@ -30,4 +30,4 @@ export default function resolveRelative(relativePath: string, ...otherPaths: Arr
}
}
return cumulativePath;
}
}
2 changes: 1 addition & 1 deletion test/dependencies-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function touch(filePath, contents) {
}
}

describe('relativePath utility', function() {
describe('resolveRelative utility', function() {
it('resolves a relative path', function() {
assert.equal(resolveRelative('.', 'foo.txt'), 'foo.txt');
});
Expand Down

0 comments on commit 3bfc58c

Please sign in to comment.