Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 9287cac

Browse files
committed
Add test for dynamic code generation in Jest environment
1 parent 03c0211 commit 9287cac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/jest-environment-miniflare/test/fixtures/core.worker.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ test("Object instanceof checks succeed", () => {
4747
expect(new Object({ a: 1 })).toEqual({ a: 1 });
4848
expect(Object.getPrototypeOf({}) === Object.prototype);
4949
});
50+
51+
test("allows dynamic code generation", () => {
52+
expect(eval("1 + 1")).toBe(2);
53+
});

0 commit comments

Comments
 (0)