From 7d404122d458dcbe886acc22c5a759b2e61b43fb Mon Sep 17 00:00:00 2001 From: Brian White Date: Thu, 5 May 2016 01:27:37 -0400 Subject: [PATCH] test: remove duplicate path tests The TypeError checks are already done later on in the test file for all path functions. PR-URL: https://github.com/nodejs/node/pull/6590 Reviewed-By: James M Snell Reviewed-By: Evan Lucas --- test/parallel/test-path.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index 8b31046e66f..503a1cbca68 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -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 @@ -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:\\'); @@ -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 @@ -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('.\\'), ''); @@ -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