Skip to content

Commit

Permalink
test: remove duplicate path tests
Browse files Browse the repository at this point in the history
The TypeError checks are already done later on in the test file
for all path functions.

PR-URL: #6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
  • Loading branch information
mscdex authored and rvagg committed Jun 2, 2016
1 parent 1908b7f commit 1469b98
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions test/parallel/test-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ assert.equal(path.posix.basename('basename.ext'), 'basename.ext');
assert.equal(path.posix.basename('basename.ext\\'), 'basename.ext\\');
assert.equal(path.posix.basename('basename.ext\\\\'), 'basename.ext\\\\');
assert.equal(path.posix.basename('foo'), 'foo');
assert.throws(path.posix.basename.bind(null, null), TypeError);
assert.throws(path.posix.basename.bind(null, true), TypeError);
assert.throws(path.posix.basename.bind(null, 1), TypeError);
assert.throws(path.posix.basename.bind(null), TypeError);
assert.throws(path.posix.basename.bind(null, {}), TypeError);

// POSIX filenames may include control characters
// c.f. http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html
Expand All @@ -67,11 +62,6 @@ assert.equal(path.posix.dirname(''), '.');
assert.equal(path.posix.dirname('/'), '/');
assert.equal(path.posix.dirname('////'), '/');
assert.equal(path.posix.dirname('foo'), '.');
assert.throws(path.posix.dirname.bind(null, null), TypeError);
assert.throws(path.posix.dirname.bind(null, true), TypeError);
assert.throws(path.posix.dirname.bind(null, 1), TypeError);
assert.throws(path.posix.dirname.bind(null), TypeError);
assert.throws(path.posix.dirname.bind(null, {}), TypeError);

assert.equal(path.win32.dirname('c:\\'), 'c:\\');
assert.equal(path.win32.dirname('c:\\foo'), 'c:\\');
Expand Down Expand Up @@ -107,11 +97,6 @@ assert.equal(path.win32.dirname(''), '.');
assert.equal(path.win32.dirname('/'), '/');
assert.equal(path.win32.dirname('////'), '/');
assert.equal(path.win32.dirname('foo'), '.');
assert.throws(path.win32.dirname.bind(null, null), TypeError);
assert.throws(path.win32.dirname.bind(null, true), TypeError);
assert.throws(path.win32.dirname.bind(null, 1), TypeError);
assert.throws(path.win32.dirname.bind(null), TypeError);
assert.throws(path.win32.dirname.bind(null, {}), TypeError);


// path.extname tests
Expand Down Expand Up @@ -190,11 +175,6 @@ assert.equal(path.win32.extname('file\\'), '');
assert.equal(path.win32.extname('file\\\\'), '');
assert.equal(path.win32.extname('file.\\'), '.');
assert.equal(path.win32.extname('file.\\\\'), '.');
assert.throws(path.win32.extname.bind(null, null), TypeError);
assert.throws(path.win32.extname.bind(null, true), TypeError);
assert.throws(path.win32.extname.bind(null, 1), TypeError);
assert.throws(path.win32.extname.bind(null), TypeError);
assert.throws(path.win32.extname.bind(null, {}), TypeError);

// On *nix, backslash is a valid name component like any other character.
assert.equal(path.posix.extname('.\\'), '');
Expand All @@ -205,11 +185,6 @@ assert.equal(path.posix.extname('file\\'), '');
assert.equal(path.posix.extname('file\\\\'), '');
assert.equal(path.posix.extname('file.\\'), '.\\');
assert.equal(path.posix.extname('file.\\\\'), '.\\\\');
assert.throws(path.posix.extname.bind(null, null), TypeError);
assert.throws(path.posix.extname.bind(null, true), TypeError);
assert.throws(path.posix.extname.bind(null, 1), TypeError);
assert.throws(path.posix.extname.bind(null), TypeError);
assert.throws(path.posix.extname.bind(null, {}), TypeError);


// path.join tests
Expand Down

0 comments on commit 1469b98

Please sign in to comment.