Skip to content

Commit 43593e0

Browse files
committed
Simplify test since the exports vary by node version 😂
1 parent 0cda956 commit 43593e0

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

‎test/hook/duplicate-exports.mjs

+3-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
import Hook from '../../index.js'
2-
import { foo } from '../fixtures/duplicate.mjs'
3-
import { strictEqual } from 'assert'
1+
import * as lib from '../fixtures/duplicate.mjs'
2+
import { notEqual } from 'assert'
43

5-
Hook((exports, name) => {
6-
if (name.endsWith('/duplicate.mjs')) {
7-
// The last export always takes priority
8-
strictEqual(exports.foo, 'b')
9-
exports.foo = '1'
10-
}
11-
})
12-
13-
strictEqual(foo, '1')
4+
notEqual(lib, undefined)

0 commit comments

Comments
 (0)