Skip to content

Commit

Permalink
Increasing timeouts for linter tests. (#429)
Browse files Browse the repository at this point in the history
These tests have been intermittently failing due to timeouts.
The open and show document functions can take a couple of seconds in the worst case scenario
which will cause the test to timeout
  • Loading branch information
gracegoo-stripe authored Nov 10, 2021
1 parent 58e959d commit 1e6d3c8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/suite/stripeLinter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import {Git} from '../../src/git';
import {NoOpTelemetry} from '../../src/telemetry';
import {StripeLinter} from '../../src/stripeLinter';

suite('StripeLinter', () => {
suite('StripeLinter', function () {
this.timeout(20000);

let sandbox: sinon.SinonSandbox;
const telemetry = new NoOpTelemetry();
const git = new Git();
Expand Down Expand Up @@ -71,7 +73,10 @@ suite('StripeLinter', () => {
const diagnostics: vscode.Diagnostic[] = vscode.languages.getDiagnostics(document.uri);

assert.strictEqual(isIgnoredStub.calledOnce, true);
assert.strictEqual(telemetrySpy.calledWith('diagnostics.show', vscode.DiagnosticSeverity.Error), true);
assert.strictEqual(
telemetrySpy.calledWith('diagnostics.show', vscode.DiagnosticSeverity.Error),
true,
);
assert.strictEqual(diagnostics.length, 1);
});

Expand Down

0 comments on commit 1e6d3c8

Please sign in to comment.