mirror of
https://github.com/morluto/rea.git
synced 2026-11-15 11:13:21 +00:00
test: consolidate JavaScript and provider fixture coverage
This commit is contained in:
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");
|
||||
|
||||
Reference in new issue
Block a user