From 57edc34ad56b90803b6ba51febc15b981000dfe4 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 17 Oct 2023 11:22:28 -0700 Subject: [PATCH] update JSON test --- tests/tests-node/esmock.node.test.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/tests-node/esmock.node.test.js b/tests/tests-node/esmock.node.test.js index 43753c2..ac06766 100644 --- a/tests/tests-node/esmock.node.test.js +++ b/tests/tests-node/esmock.node.test.js @@ -553,27 +553,25 @@ test('should mock imported json', async () => { const importsJSON = await esmock( '../local/importsJSONfile.js', { '../local/example.json': { - 'test-example': 'test-json' + 'test-example': 'test-json-a' } }) assert.strictEqual( Object.keys(importsJSON.JSONobj).sort().join(), 'example,test-example') - assert.strictEqual(importsJSON.JSONobj['test-example'], 'test-json') + assert.strictEqual(importsJSON.JSONobj['test-example'], 'test-json-a') assert.strictEqual(importsJSON.JSONobj['example'], 'json') }) -/* + test('should mock imported json (strict)', async () => { const importsJSON = await esmock.strict( '../local/importsJSONfile.js', { '../local/example.json': { - 'test-example': 'test-json' + 'test-example': 'test-json-b' } }) assert.strictEqual( Object.keys(importsJSON.JSONobj).sort().join(), 'test-example') - assert.strictEqual(importsJSON.JSONobj['test-example'], 'test-json') + assert.strictEqual(importsJSON.JSONobj['test-example'], 'test-json-b') }) -*/ -