Skip to content

Commit 1a0e154

Browse files
authored
fix(test): remove constant-kind exclusion from parity test (#676) (#680)
The native engine's find_parent_of_types scope guard was fixed in #649 (added generator_function_declaration and generator_function). Both engines now use identical scope filters for constant extraction, so the kind != 'constant' workaround in the parity test is no longer needed. Closes #676
1 parent ce3ae80 commit 1a0e154

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

tests/integration/build-parity.test.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,20 @@ function copyDirSync(src, dest) {
3636

3737
function readGraph(dbPath) {
3838
const db = new Database(dbPath, { readonly: true });
39-
// PARITY BUG (#676): Native engine extracts local `const` variables inside
40-
// functions as top-level constants; WASM correctly limits to program-level.
41-
// Fix: crates/codegraph-core/src/extractors/javascript.rs (find_parent_of_types guard)
42-
// Remove this exclusion once #676 is resolved.
4339
const nodes = db
44-
.prepare(
45-
"SELECT name, kind, file, line FROM nodes WHERE kind != 'constant' ORDER BY name, kind, file, line",
46-
)
40+
.prepare('SELECT name, kind, file, line FROM nodes ORDER BY name, kind, file, line')
4741
.all();
4842
const edges = db
4943
.prepare(`
5044
SELECT n1.name AS source_name, n2.name AS target_name, e.kind
5145
FROM edges e
5246
JOIN nodes n1 ON e.source_id = n1.id
5347
JOIN nodes n2 ON e.target_id = n2.id
54-
WHERE n1.kind != 'constant' AND n2.kind != 'constant'
5548
ORDER BY n1.name, n2.name, e.kind
5649
`)
5750
.all();
5851
const roles = db
59-
.prepare(
60-
"SELECT name, role FROM nodes WHERE role IS NOT NULL AND kind != 'constant' ORDER BY name, role",
61-
)
52+
.prepare('SELECT name, role FROM nodes WHERE role IS NOT NULL ORDER BY name, role')
6253
.all();
6354

6455
// ast_nodes may not exist on older schemas — read if available

0 commit comments

Comments
 (0)