mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 14:26:07 +00:00
refactor(javascript): group domain semantics and contracts (#907)
This commit is contained in:
1 parent
d5f28fb29c
commit
f6a58f1062
253 files changed
+432
-410
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { parse } from "@babel/parser";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { fingerprintJavaScriptAst } from "./javascriptAstFingerprint.js";
|
||||
|
||||
describe("JavaScript AST fingerprints", () => {
|
||||
it("includes complete literal values in the fingerprint", () => {
|
||||
const prefix = "x".repeat(1_024);
|
||||
const left = parse(`const value = ${JSON.stringify(`${prefix}left`)};`);
|
||||
const right = parse(`const value = ${JSON.stringify(`${prefix}right`)};`);
|
||||
|
||||
expect(fingerprintJavaScriptAst(left)).not.toBe(
|
||||
fingerprintJavaScriptAst(right),
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user