From 0f3f818537d26b4d58fc8ba5924c29debfd647ae Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Tue, 7 May 2024 16:25:00 +0300 Subject: [PATCH] test: fix unit test assert (#60) --- esbuild-node-externals/test/unit/index.test.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/esbuild-node-externals/test/unit/index.test.mjs b/esbuild-node-externals/test/unit/index.test.mjs index e557f7c..8606e3a 100644 --- a/esbuild-node-externals/test/unit/index.test.mjs +++ b/esbuild-node-externals/test/unit/index.test.mjs @@ -19,12 +19,13 @@ describe('nodeExternalsPlugin', () => { } await build(config) const result1 = await fs.readFile(path.resolve(__dirname, '../temp/index.js'), 'utf8') - assert.ok(result1.includes('node_modules/tslib/tslib.es6.mjs'), true) + assert.equal(result1.includes('node_modules/tslib/tslib.es6.mjs'), true) await build({ ...config, plugins: [plugin] }) - assert.ok(result1.includes('node_modules/tslib/tslib.es6.mjs'), false) + const result2 = await fs.readFile(path.resolve(__dirname, '../temp/index.js'), 'utf8') + assert.equal(result2.includes('node_modules/tslib/tslib.es6.mjs'), false) }) })