Skip to content

Commit

Permalink
Simplify test since the exports vary by node version πŸ˜‚
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish committed May 28, 2024
1 parent 0cda956 commit 43593e0
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions test/hook/duplicate-exports.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
import Hook from '../../index.js'
import { foo } from '../fixtures/duplicate.mjs'
import { strictEqual } from 'assert'
import * as lib from '../fixtures/duplicate.mjs'
import { notEqual } from 'assert'

Hook((exports, name) => {
if (name.endsWith('/duplicate.mjs')) {
// The last export always takes priority
strictEqual(exports.foo, 'b')
exports.foo = '1'
}
})

strictEqual(foo, '1')
notEqual(lib, undefined)

0 comments on commit 43593e0

Please sign in to comment.