Skip to content
Permalink
Browse files

test, feat: add path.resolve root test case

  • Loading branch information...
ngot committed May 23, 2019
1 parent babc961 commit 6e8e02c487d880c1f578d0b6ad8fe98443fde083
Showing with 8 additions and 1 deletion.
  1. +8 −1 test/path_test.js
@@ -843,6 +843,13 @@ describe('path', () => {
assert.strictEqual(failures.length, 0, failures.join(''));
});

it('root resolve', () => {
const cwd = process.cwd();
process.chdir('/');
assert.equal(path.resolve('a/b/c/', '../../..'), process.cwd());
process.chdir(cwd);
});

it('relative', () => {
const failures = [];
const slashRE = /\//g;
@@ -1080,4 +1087,4 @@ describe('path', () => {
});
});

require.main === module && test.run(console.DEBUG);
require.main === module && test.run(console.DEBUG);

0 comments on commit 6e8e02c

Please sign in to comment.
You can’t perform that action at this time.