Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Sep 25, 2024
1 parent 5d07511 commit 1f929b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import './module.js'

const require = () => 'result'
const __dirname = 'something'
const __filename = 'something/else'

it('should allow declaring CJS globals in ESM', () => {
expect(require()).toBe('result')
expect(__dirname).toBe('something')
expect(__filename).toBe('something/else')
})

0 comments on commit 1f929b6

Please sign in to comment.