From 9800c517ca8a8abcadf6aba12e429acba0288f8b Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 17 Nov 2022 09:25:55 -0800 Subject: [PATCH] [Tests] increase timeouts --- tests/src/core/getExports.js | 10 +++++----- tests/src/core/resolve.js | 4 ++-- tests/src/rules/no-unused-modules.js | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/src/core/getExports.js b/tests/src/core/getExports.js index 6dea6e0210..86c1915968 100644 --- a/tests/src/core/getExports.js +++ b/tests/src/core/getExports.js @@ -367,7 +367,7 @@ describe('ExportMap', function () { let imports; before('load imports', function () { - this.timeout(20000); // takes a long time :shrug: + this.timeout(20e3); // takes a long time :shrug: sinon.spy(tsConfigLoader, 'tsConfigLoader'); imports = ExportMap.get('./typescript.ts', context); }); @@ -436,13 +436,13 @@ describe('ExportMap', function () { it('should cache after parsing for an ambiguous module', function () { const source = './typescript-declare-module.ts'; const parseSpy = sinon.spy(ExportMap, 'parse'); - + expect(ExportMap.get(source, context)).to.be.null; - + ExportMap.get(source, context); - + expect(parseSpy.callCount).to.equal(1); - + parseSpy.restore(); }); }); diff --git a/tests/src/core/resolve.js b/tests/src/core/resolve.js index 360d4a2e70..05a6aaeb68 100644 --- a/tests/src/core/resolve.js +++ b/tests/src/core/resolve.js @@ -401,7 +401,7 @@ describe('resolve', function () { // special behavior for infinity describe('infinite cache', function () { - this.timeout(1500); + this.timeout(1.5e3); before((done) => setTimeout(done, 1100)); @@ -414,7 +414,7 @@ describe('resolve', function () { }); describe('finite cache', function () { - this.timeout(1200); + this.timeout(1.2e3); before((done) => setTimeout(done, 1000)); it('gets correct values after cache lifetime', function () { expect(resolve(original, context)).not.to.exist; diff --git a/tests/src/rules/no-unused-modules.js b/tests/src/rules/no-unused-modules.js index 8c8fc7c4ed..ef3990be9b 100644 --- a/tests/src/rules/no-unused-modules.js +++ b/tests/src/rules/no-unused-modules.js @@ -251,6 +251,8 @@ describe('dynamic imports', () => { return; } + this.timeout(10e3); + // test for unused exports with `import()` ruleTester.run('no-unused-modules', rule, { valid: [