Skip to content

Commit

Permalink
[Tests] increase timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 17, 2022
1 parent 8b0fb98 commit 9964463
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tests/src/core/getExports.js
Expand Up @@ -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);
});
Expand Down Expand Up @@ -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();
});
});
Expand Down
4 changes: 2 additions & 2 deletions tests/src/core/resolve.js
Expand Up @@ -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));

Expand All @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion tests/src/rules/no-unused-modules.js
Expand Up @@ -243,14 +243,16 @@ ruleTester.run('no-unused-modules', rule, {
});


describe('dynamic imports', () => {
describe('dynamic imports', function () {
if (semver.satisfies(eslintPkg.version, '< 6')) {
beforeEach(function () {
this.skip();
});
return;
}

this.timeout(10e3);

// test for unused exports with `import()`
ruleTester.run('no-unused-modules', rule, {
valid: [
Expand Down

0 comments on commit 9964463

Please sign in to comment.