Commit 66fc1b9
authored
fix(test): smoke-test erlang grammar compatibility to prevent false failures
* fix(test): smoke-test erlang grammar compatibility before running suite
The erlangAvailable guard only checked whether the WASM loaded, not whether
it produced the expected node types. A stale WASM from a different grammar
vendor (e.g. enolib/tree-sitter-erlang) loads successfully but emits generic
'attribute' nodes instead of 'module_attribute'/'fun_decl'/etc., so all
extractions return empty and every test fails rather than skips.
Add a minimal probe in beforeAll: parse '-module(probe).' and check that
extractErlangSymbols finds a 'module' definition. If it doesn't — whether
because the grammar is absent or is the wrong vendor — erlangAvailable is
set to false and all 14 tests skip cleanly.
Closes #1502
Closes #1504
* test(erlang): eliminate redundant parsers.get call in beforeAll smoke-test1 parent 4a1329f commit 66fc1b9
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
13 | 29 | | |
14 | 30 | | |
15 | 31 | | |
| |||
0 commit comments