mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-11 01:02:01 +03:00
🧹 Remove leftover console.log from extensions test
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
parent
c958f30662
commit
49bde018b5
1 changed files with 2 additions and 5 deletions
|
|
@ -130,13 +130,10 @@ describe("extensions", () => {
|
||||||
|
|
||||||
it("has no host globals inside the sandbox", async () => {
|
it("has no host globals inside the sandbox", async () => {
|
||||||
await runExtensions(mockEngine as SumEngine, [
|
await runExtensions(mockEngine as SumEngine, [
|
||||||
{ name: "probe", code: "if (typeof window !== 'undefined' || typeof fetch !== 'undefined') throw new Error('leak');" },
|
{ name: "probe", code: "if (typeof window !== 'undefined' || typeof fetch !== 'undefined' || typeof console !== 'undefined') throw new Error('leak');" },
|
||||||
{ name: "log", code: "console.log('hi');" },
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
expect(consoleErrorSpy).toHaveBeenCalledTimes(1);
|
expect(consoleErrorSpy).not.toHaveBeenCalled();
|
||||||
expect(consoleErrorSpy.mock.calls[0][0]).toBe("extension log failed:");
|
|
||||||
expect(consoleErrorSpy.mock.calls[0][1].message).toMatch(/console/);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("interrupts an infinite loop at load time", async () => {
|
it("interrupts an infinite loop at load time", async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue