mirror of
https://github.com/morluto/rea.git
synced 2026-10-28 02:15:44 +00:00
test(javascript): align semantic fixtures with runtime context
This commit is contained in:
1 parent
c3ad8fc024
commit
59553c76be
4 files changed
+31
-12
No files matched your search
@@ -168,7 +168,14 @@ it("retains a finite shared callable alias graph", () => {
|
||||
index.bindings,
|
||||
"direct-call",
|
||||
)(call.callee, call);
|
||||
const declaration = parsed.program.body[0];
|
||||
if (!t.isVariableDeclaration(declaration))
|
||||
throw new Error("Expected root callable declaration");
|
||||
const callable = declaration.declarations[0]?.init;
|
||||
if (!t.isArrowFunctionExpression(callable))
|
||||
throw new Error("Expected root arrow callable");
|
||||
expect(result).toEqual({
|
||||
callables: new Set([callable]),
|
||||
references: [
|
||||
{
|
||||
node: expect.objectContaining({ type: "Identifier", name: "module" }),
|
||||
|
||||
Reference in new issue
Block a user