Skip to content

Commit e76913f

Browse files
committed
fix(test): use parsers.get not parsers.has to detect erlang WASM availability
parsers.has('erlang') returns true even when WASM loading fails because doLoadLanguage sets the key to null on error. Use !!parsers.get('erlang') so the suite skips correctly when the grammar is absent.
1 parent 7ef7df4 commit e76913f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/parsers/erlang.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('Erlang parser', () => {
99

1010
beforeAll(async () => {
1111
parsers = await createParsers();
12-
erlangAvailable = parsers.has('erlang');
12+
erlangAvailable = !!parsers.get('erlang');
1313
});
1414

1515
function parseErlang(code) {

0 commit comments

Comments
 (0)