mirror of
https://github.com/morluto/rea.git
synced 2026-11-22 06:25:44 +00:00
test(javascript): pin the external-script loads edge to its HTML source
The new inline-scripts CLI case asserted the external <script src> survived by matching a "loads" edge on resolved_path alone. The fixture's package.json also declares "main":"main.js", which produces its own "loads" edge with the same resolved_path, so the assertion could pass through the package entrypoint even if the HTML script edge regressed. Also require script_path === "main.js" to pin the assertion to the HTML-derived edge, matching the reference-html case in the same file. Tests-only.
This commit is contained in:
1 parent
3eae4de89f
commit
fe8e571f78
1 file changed
+3
-1
@@ -255,7 +255,9 @@ cliTest(
|
||||
expect(
|
||||
result.graph.edges.some(
|
||||
({ relation, properties }) =>
|
||||
relation === "loads" && properties.resolved_path === "main.js",
|
||||
relation === "loads" &&
|
||||
properties.script_path === "main.js" &&
|
||||
properties.resolved_path === "main.js",
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
|
||||
Reference in new issue
Block a user