Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function assertCalledWithScopeInfo<T extends ScopeTypeInfo>(
fake: sinon.SinonSpy<[scopeInfos: T[]], void>,
...expectedScopeInfos: T[]
) {
await sleepWithBackoff(25);
await sleepWithBackoff(100);
sinon.assert.called(fake);

for (const expectedScopeInfo of expectedScopeInfos) {
Expand All @@ -26,7 +26,7 @@ export async function assertCalledWithoutScopeInfo<T extends ScopeTypeInfo>(
fake: sinon.SinonSpy<[scopeInfos: T[]], void>,
...scopeTypes: ScopeType[]
) {
await sleepWithBackoff(25);
await sleepWithBackoff(100);
sinon.assert.called(fake);

for (const scopeType of scopeTypes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { getCursorlessApi, openNewEditor } from "@cursorless/vscode-common";
import { stat, unlink, writeFile } from "fs/promises";
import * as sinon from "sinon";
import { commands } from "vscode";
import { sleepWithBackoff } from "../../endToEndTestSetup";
import {
assertCalledWithScopeInfo,
assertCalledWithoutScopeInfo,
Expand All @@ -35,14 +34,12 @@ export async function runCustomRegexScopeInfoTest() {
cursorlessTalonStateJsonPath,
JSON.stringify(spokenFormJsonContents),
);
await sleepWithBackoff(50);
await assertCalledWithScopeInfo(fake, unsupported);

await openNewEditor(contents);
await assertCalledWithScopeInfo(fake, present);

await unlink(cursorlessTalonStateJsonPath);
await sleepWithBackoff(100);
await assertCalledWithoutScopeInfo(fake, scopeType);
} finally {
disposable.dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ScopeTypeInfo, sleep } from "@cursorless/common";
import * as sinon from "sinon";
import { assertCalledWithScopeInfo } from "./assertCalledWithScopeInfo";
import { stat, unlink, writeFile } from "fs/promises";
import { sleepWithBackoff } from "../../endToEndTestSetup";

/**
* Tests that the scope provider correctly reports custom spoken forms
Expand Down Expand Up @@ -31,7 +30,6 @@ export async function runCustomSpokenFormScopeInfoTest() {
cursorlessTalonStateJsonPath,
JSON.stringify(spokenFormJsonContents),
);
await sleepWithBackoff(50);
await assertCalledWithScopeInfo(
fake,
subjectCustom,
Expand All @@ -43,7 +41,6 @@ export async function runCustomSpokenFormScopeInfoTest() {
);

await unlink(cursorlessTalonStateJsonPath);
await sleepWithBackoff(100);
await assertCalledWithScopeInfo(
fake,
roundStandard,
Expand Down