From 7e43fff018b904b030ef22ec64a0df90d547c3a6 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 13 Feb 2024 11:45:11 +0100 Subject: [PATCH] Execute sloppy code test --- packages/server/src/jsRunner/tests/jsRunner.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/server/src/jsRunner/tests/jsRunner.spec.ts b/packages/server/src/jsRunner/tests/jsRunner.spec.ts index 285ade7097..85691878bd 100644 --- a/packages/server/src/jsRunner/tests/jsRunner.spec.ts +++ b/packages/server/src/jsRunner/tests/jsRunner.spec.ts @@ -30,6 +30,11 @@ describe("jsRunner", () => { expect(output).toBe(3) }) + it("it can execute sloppy javascript", async () => { + const output = await processJS(`a=2;b=3;return a + b`) + expect(output).toBe(5) + }) + it("should prevent sandbox escape", async () => { const output = await processJS( `return this.constructor.constructor("return process")()`