From 82db76627fbbd60322cc85009ff06b5f1df1e0f0 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 1 Feb 2024 10:56:59 +0100 Subject: [PATCH] Better typing --- packages/server/src/jsRunner/tests/jsRunner.spec.ts | 5 ++++- packages/string-templates/test/utils.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/server/src/jsRunner/tests/jsRunner.spec.ts b/packages/server/src/jsRunner/tests/jsRunner.spec.ts index ddef60a80e..56314c9565 100644 --- a/packages/server/src/jsRunner/tests/jsRunner.spec.ts +++ b/packages/server/src/jsRunner/tests/jsRunner.spec.ts @@ -27,6 +27,7 @@ describe("jsRunner", () => { const config = new TestConfiguration() beforeAll(async () => { + // Register js runner init() await config.init() }) @@ -42,5 +43,7 @@ describe("jsRunner", () => { expect(output).toBe(3) }) - runJsHelpersTests((func: any) => config.doInContext(config.getAppId(), func)) + runJsHelpersTests({ + funcWrap: (func: any) => config.doInContext(config.getAppId(), func), + }) }) diff --git a/packages/string-templates/test/utils.js b/packages/string-templates/test/utils.js index 33f6c6d6b6..04faffb27d 100644 --- a/packages/string-templates/test/utils.js +++ b/packages/string-templates/test/utils.js @@ -60,7 +60,9 @@ const getParsedManifest = () => { } module.exports.getParsedManifest = getParsedManifest -module.exports.runJsHelpersTests = (funcWrap = delegate => delegate()) => { +module.exports.runJsHelpersTests = ( + { funcWrap } = { funcWrap: delegate => delegate() } +) => { const manifest = getParsedManifest() const processJS = (js, context) => {