Skip to content

Commit bb988f3

Browse files
Remove node from runIntegrationTests (#2502)
Since `runIntegrationTests` is constructed in the engine it cannot use assert. Switching assert to throwing an error I think is totally fine here. It will still fail the test and we don't have that many legacy scopes left and hopefully soon they will be gone as well. ## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet
1 parent 4282c4b commit bb988f3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/cursorless-engine/src/runIntegrationTests.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { languageMatchers } from "./languages/getNodeMatcher";
22
import { TreeSitter } from "./typings/TreeSitter";
33
import { legacyLanguageIds } from "./languages/LegacyLanguageId";
44
import { LanguageDefinitions } from "./languages/LanguageDefinitions";
5-
import assert from "assert";
65
import { unsafeKeys } from "./util/object";
76

87
/**
@@ -42,5 +41,7 @@ async function assertNoScopesBothLegacyAndNew(
4241
});
4342
}
4443

45-
assert.deepStrictEqual(errors, []);
44+
if (errors.length > 0) {
45+
throw Error(errors.join("\n"));
46+
}
4647
}

0 commit comments

Comments
 (0)