diff --git a/packages/builder/tests/buildCodeForScreen.spec.js b/packages/builder/tests/buildCodeForScreen.spec.js index 6f00cc541b..87f4c02fa3 100644 --- a/packages/builder/tests/buildCodeForScreen.spec.js +++ b/packages/builder/tests/buildCodeForScreen.spec.js @@ -56,4 +56,8 @@ describe("buildCodeForScreen", () => { }) }) -const getFunctions = screen => new Function(buildCodeForScreens([screen]))() +const getFunctions = screen => { + const code = buildCodeForScreens([screen]) + const func = new Function(`return ${code}`)() + return func +}