From dbf0a1741a59571295debec4dca13ad7b24e172b Mon Sep 17 00:00:00 2001 From: David Bosschaert Date: Wed, 1 May 2024 08:29:31 +0100 Subject: [PATCH] Add additional function call --- tests/local/bossch.fnimported.js | 4 +++- tests/tests-node/esmock.node.bossch.test.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/local/bossch.fnimported.js b/tests/local/bossch.fnimported.js index e743e84..35d23f2 100644 --- a/tests/local/bossch.fnimported.js +++ b/tests/local/bossch.fnimported.js @@ -1 +1,3 @@ -export const fnimported = () => 'un-mocked' +export const fnother = () => 'un-mocked' + +export const fnimported = () => fnother() diff --git a/tests/tests-node/esmock.node.bossch.test.js b/tests/tests-node/esmock.node.bossch.test.js index 6a613d5..406748a 100644 --- a/tests/tests-node/esmock.node.bossch.test.js +++ b/tests/tests-node/esmock.node.bossch.test.js @@ -5,7 +5,7 @@ import esmock from 'esmock' test('should mock importedfn', async () => { const { fncaller } = await esmock('../local/bossch.fnimporter.js', { '../local/bossch.fnimported.js': { - fnimported: () => 'mocky' + fnother: () => 'mocky' } })