test: consolidate JavaScript and provider fixture coverage

This commit is contained in:
morluto committed 2026-11-10 16:32:53 -05:00
1 parent 439c197c3f
commit 3c4be703cd
16 files changed
+23 -223

No files matched your search

@@ -1178,15 +1178,7 @@ it("keeps distinct exposed renderer listener callsites distinct", () => {
result.electron.call_paths?.filter(({ channel }) => channel === "pong"),
).toHaveLength(2);
});
it("does not identify overwritten Electron namespaces or shadowed require", () => {
for (const source of [
`const e=require("electron");e.ipcMain={on(){}};e.ipcMain.on("bad",event=>event.sender.copy());`,
`function require(){return {ipcMain:{on(){}}}};const e=require("electron");e.ipcMain.on("bad",event=>event.sender.copy());`,
])
expect(
analyzeJavaScriptStaticSource(source).electron.call_paths ?? [],
).toEqual([]);
});
it("preserves guarded alternatives in direct exposed object literals", () => {
const result = analyzeJavaScriptStaticSource(`
const e=require("electron");