mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 17:28:08 +00:00
fix(javascript): preserve lexical open and exact template semantics
This commit is contained in:
1 parent
fe297e56e8
commit
d6cc9ca3a6
8 files changed
+106
-20
No files matched your search
@@ -44,4 +44,24 @@ describe("Electron option evidence", () => {
|
||||
service_name: null,
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps recovered templates with invalid escapes dynamic", () => {
|
||||
const source = [
|
||||
"new BrowserWindow({ webPreferences: { sandbox: `",
|
||||
String.raw`\unicode`,
|
||||
"` } });",
|
||||
].join("");
|
||||
const analysis = analyzeJavaScriptStaticSource(source);
|
||||
|
||||
expect(analysis.parse_status).toBe("partial");
|
||||
expect(analysis.parse_error_count).toBe(1);
|
||||
expect(
|
||||
analysis.electron.browser_windows[0]?.web_preferences,
|
||||
).toContainEqual(
|
||||
expect.objectContaining({
|
||||
name: "sandbox",
|
||||
value: expect.objectContaining({ status: "dynamic", value: null }),
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user