mirror of
https://github.com/morluto/rea.git
synced 2026-11-18 20:53:00 +00:00
test(javascript): consolidate semantic graph coverage
This commit is contained in:
1 parent
e2e3881c0e
commit
c77d4261a1
17 files changed
+684
-1098
No files matched your search
@@ -14,7 +14,7 @@ cliTest(
|
||||
const root = await createTestTempDirectory("rea-graph-query-coverage-");
|
||||
await writeFile(
|
||||
join(root, "main.cjs"),
|
||||
'const { EventEmitter } = require("node:events"); const bus = new EventEmitter(); bus.on("", function emptyListener() {}); function read() { return this.speed; }',
|
||||
'const { EventEmitter } = require("node:events"); const bus = new EventEmitter(); bus.on("", function emptyListener() {}); bus.on("data", function dataListener() {}); function read() { return this.speed; }',
|
||||
);
|
||||
await writeFile(join(root, "other.js"), "export const answer = 42;");
|
||||
const response = await cli.run({
|
||||
@@ -75,6 +75,14 @@ cliTest(
|
||||
}),
|
||||
]),
|
||||
);
|
||||
expect(
|
||||
seedNodes
|
||||
.map((node) => [node?.kind, node?.properties.event_name])
|
||||
.sort(),
|
||||
).toEqual([
|
||||
["event", ""],
|
||||
["listener", ""],
|
||||
]);
|
||||
} else {
|
||||
expect(trace.summary.relevant_unknowns).toBeGreaterThan(0);
|
||||
expect(seedNodes).toContainEqual(
|
||||
|
||||
Reference in new issue
Block a user