Skip to content

Commit

Permalink
test: fix unit test assert (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub authored May 7, 2024
1 parent 4aec07d commit 0f3f818
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions esbuild-node-externals/test/unit/index.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})

0 comments on commit 0f3f818

Please sign in to comment.