Skip to content

Commit 65bb61b

Browse files
committed
Set timeouts on tests correctly
The timeouts need to be set either on a per-file basis, or per test by using the parameter in `it`. Since we have both Mocha and Jest types, we need to declare in the test file which one we're using.
1 parent 3da0034 commit 65bb61b

5 files changed

Lines changed: 203 additions & 198 deletions

File tree

extensions/ql-vscode/src/vscode-tests/no-workspace/query-history.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,8 +1111,6 @@ describe("query-history", () => {
11111111
});
11121112

11131113
it("should not throw an error when the query directory does not exist", async () => {
1114-
// because of the waits, we need to have a higher timeout on this test.
1115-
jest.setTimeout(5000);
11161114
registerScrubber("idontexist");
11171115

11181116
jest.advanceTimersByTime(ONE_HOUR_IN_MS);
@@ -1141,8 +1139,6 @@ describe("query-history", () => {
11411139
});
11421140

11431141
it("should scrub directories", async () => {
1144-
jest.setTimeout(5000);
1145-
11461142
// create two query directories that are right around the cut off time
11471143
const queryDir = createMockQueryDir(
11481144
ONE_HOUR_IN_MS,

0 commit comments

Comments
 (0)