diff --git a/package.json b/package.json index d064bde..f4c477e 100644 --- a/package.json +++ b/package.json @@ -49,21 +49,21 @@ "url": "https://github.com/kaelzhang/node-ignore/issues" }, "devDependencies": { - "@babel/cli": "^7.8.4", - "@babel/core": "^7.9.6", - "@babel/preset-env": "^7.9.6", - "codecov": "^3.7.0", - "debug": "^4.1.1", - "eslint": "^7.0.0", + "@babel/cli": "^7.19.3", + "@babel/core": "^7.20.5", + "@babel/preset-env": "^7.20.2", + "codecov": "^3.8.2", + "debug": "^4.3.4", + "eslint": "^8.30.0", "eslint-config-ostai": "^3.0.0", - "eslint-plugin-import": "^2.20.2", + "eslint-plugin-import": "^2.26.0", "mkdirp": "^1.0.4", "pre-suf": "^1.1.1", "rimraf": "^3.0.2", "spawn-sync": "^2.0.0", - "tap": "^14.10.7", + "tap": "^16.3.2", "tmp": "0.2.1", - "typescript": "^3.9.3" + "typescript": "^4.9.4" }, "engines": { "node": ">= 4" diff --git a/test/fixtures/cases.js b/test/fixtures/cases.js index b859ecf..0c87529 100644 --- a/test/fixtures/cases.js +++ b/test/fixtures/cases.js @@ -1043,7 +1043,7 @@ exports.cases = iteratee => { expected = expected.map(mapper) } - t.deepEqual(result.sort(), expected.sort()) + t.same(result.sort(), expected.sort()) } iteratee({ diff --git a/test/git-check-ignore.js b/test/git-check-ignore.js index 6b2f3c8..19d05c7 100644 --- a/test/git-check-ignore.js +++ b/test/git-check-ignore.js @@ -15,9 +15,8 @@ const { const {test} = tap -// This test file is related to dealing with file systems which takes time, -// so remove timeout setting. -tap.setTimeout(0) +// This test file is related to dealing with file systems which takes time +tap.setTimeout(600000) const touch = (root, file, content) => { const dirs = file.split('/') diff --git a/test/ignore.js b/test/ignore.js index 0bbf688..fcf1db4 100755 --- a/test/ignore.js +++ b/test/ignore.js @@ -54,7 +54,7 @@ cases(({ const ig = ignore().addPattern(patterns) Object.keys(paths_object).forEach(path => { - t.is(ig.ignores(path), !!paths_object[path], `path: "${path}"`) + t.equal(ig.ignores(path), !!paths_object[path], `path: "${path}"`) }) t.end() }) diff --git a/test/others.js b/test/others.js index f317a70..2411b00 100644 --- a/test/others.js +++ b/test/others.js @@ -26,8 +26,8 @@ _test('.add()', t => { '.abc/e/e.js' // included by b, filtered out by a ] - t.deepEqual(a.filter(paths), ['.abc/d/e.js']) - t.deepEqual(b.filter(paths), ['.abc/d/e.js', '.abc/e/e.js']) + t.same(a.filter(paths), ['.abc/d/e.js']) + t.same(b.filter(paths), ['.abc/d/e.js', '.abc/e/e.js']) t.end() }) @@ -41,7 +41,7 @@ _test('fixes babel class', t => { return } - t.is('there should be an error', 'no error found') + t.equal('there should be an error', 'no error found') t.end() }) @@ -67,8 +67,8 @@ _test('#32', t => { '.abc/e/e.js' // included by b, filtered out by a ] - t.deepEqual(a.filter(paths), ['.abc/d/e.js']) - t.deepEqual(b.filter(paths), ['.abc/d/e.js', '.abc/e/e.js']) + t.same(a.filter(paths), ['.abc/d/e.js']) + t.same(b.filter(paths), ['.abc/d/e.js', '.abc/e/e.js']) t.end() }) @@ -79,9 +79,9 @@ _test('options.ignorecase', t => { ig.add('*.[jJ][pP]g') - t.is(ig.ignores('a.jpg'), true) - t.is(ig.ignores('a.JPg'), true) - t.is(ig.ignores('a.JPG'), false) + t.equal(ig.ignores('a.jpg'), true) + t.equal(ig.ignores('a.JPg'), true) + t.equal(ig.ignores('a.JPG'), false) t.end() }) @@ -94,7 +94,7 @@ _test('special case: internal cache respects ignorecase', t => { ig.add(rule) - t.is(ig.ignores('a.JPG'), false) + t.equal(ig.ignores('a.JPG'), false) const ig2 = ignore({ ignorecase: true @@ -102,7 +102,7 @@ _test('special case: internal cache respects ignorecase', t => { ig2.add(rule) - t.is(ig2.ignores('a.JPG'), true) + t.equal(ig2.ignores('a.JPG'), true) t.end() }) @@ -164,7 +164,7 @@ _test('isPathValid', t => { ) } - t.deepEqual( + t.same( paths.filter(isPathValid), [ 'foo' @@ -220,7 +220,7 @@ IGNORE_TEST_CASES.forEach(([d, patterns, path, [ignored, unignored]]) => { ig.add(patterns) } - t.deepEqual(ig.test(path), { + t.same(ig.test(path), { ignored, unignored }) @@ -235,7 +235,7 @@ _test('options.allowRelativePaths', t => { ig.add('foo') - t.is(ig.ignores('../foo/bar.js'), true) + t.equal(ig.ignores('../foo/bar.js'), true) t.throws(() => ignore().ignores('../foo/bar.js'))