Skip to content

Commit 1469b98

Browse files
mscdexrvagg
authored andcommitted
test: remove duplicate path tests
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>
1 parent 1908b7f commit 1469b98

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

test/parallel/test-path.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ assert.equal(path.posix.basename('basename.ext'), 'basename.ext');
4343
assert.equal(path.posix.basename('basename.ext\\'), 'basename.ext\\');
4444
assert.equal(path.posix.basename('basename.ext\\\\'), 'basename.ext\\\\');
4545
assert.equal(path.posix.basename('foo'), 'foo');
46-
assert.throws(path.posix.basename.bind(null, null), TypeError);
47-
assert.throws(path.posix.basename.bind(null, true), TypeError);
48-
assert.throws(path.posix.basename.bind(null, 1), TypeError);
49-
assert.throws(path.posix.basename.bind(null), TypeError);
50-
assert.throws(path.posix.basename.bind(null, {}), TypeError);
5146

5247
// POSIX filenames may include control characters
5348
// c.f. http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html
@@ -67,11 +62,6 @@ assert.equal(path.posix.dirname(''), '.');
6762
assert.equal(path.posix.dirname('/'), '/');
6863
assert.equal(path.posix.dirname('////'), '/');
6964
assert.equal(path.posix.dirname('foo'), '.');
70-
assert.throws(path.posix.dirname.bind(null, null), TypeError);
71-
assert.throws(path.posix.dirname.bind(null, true), TypeError);
72-
assert.throws(path.posix.dirname.bind(null, 1), TypeError);
73-
assert.throws(path.posix.dirname.bind(null), TypeError);
74-
assert.throws(path.posix.dirname.bind(null, {}), TypeError);
7565

7666
assert.equal(path.win32.dirname('c:\\'), 'c:\\');
7767
assert.equal(path.win32.dirname('c:\\foo'), 'c:\\');
@@ -107,11 +97,6 @@ assert.equal(path.win32.dirname(''), '.');
10797
assert.equal(path.win32.dirname('/'), '/');
10898
assert.equal(path.win32.dirname('////'), '/');
10999
assert.equal(path.win32.dirname('foo'), '.');
110-
assert.throws(path.win32.dirname.bind(null, null), TypeError);
111-
assert.throws(path.win32.dirname.bind(null, true), TypeError);
112-
assert.throws(path.win32.dirname.bind(null, 1), TypeError);
113-
assert.throws(path.win32.dirname.bind(null), TypeError);
114-
assert.throws(path.win32.dirname.bind(null, {}), TypeError);
115100

116101

117102
// path.extname tests
@@ -190,11 +175,6 @@ assert.equal(path.win32.extname('file\\'), '');
190175
assert.equal(path.win32.extname('file\\\\'), '');
191176
assert.equal(path.win32.extname('file.\\'), '.');
192177
assert.equal(path.win32.extname('file.\\\\'), '.');
193-
assert.throws(path.win32.extname.bind(null, null), TypeError);
194-
assert.throws(path.win32.extname.bind(null, true), TypeError);
195-
assert.throws(path.win32.extname.bind(null, 1), TypeError);
196-
assert.throws(path.win32.extname.bind(null), TypeError);
197-
assert.throws(path.win32.extname.bind(null, {}), TypeError);
198178

199179
// On *nix, backslash is a valid name component like any other character.
200180
assert.equal(path.posix.extname('.\\'), '');
@@ -205,11 +185,6 @@ assert.equal(path.posix.extname('file\\'), '');
205185
assert.equal(path.posix.extname('file\\\\'), '');
206186
assert.equal(path.posix.extname('file.\\'), '.\\');
207187
assert.equal(path.posix.extname('file.\\\\'), '.\\\\');
208-
assert.throws(path.posix.extname.bind(null, null), TypeError);
209-
assert.throws(path.posix.extname.bind(null, true), TypeError);
210-
assert.throws(path.posix.extname.bind(null, 1), TypeError);
211-
assert.throws(path.posix.extname.bind(null), TypeError);
212-
assert.throws(path.posix.extname.bind(null, {}), TypeError);
213188

214189

215190
// path.join tests

0 commit comments

Comments
 (0)