Skip to content

Commit fafee28

Browse files
committed
chore: move cjs to mjs so standardx doesn't check it
1 parent 8b61045 commit fafee28

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

test/cjs-esm-compare.cjs test/cjs-esm-compare.mjs

+15-14
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
/* global describe, it */
44

5+
import { createRequire } from 'module'
6+
const require = createRequire(import.meta.url)
57
require('chai').should()
68

79
const text = `usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]
@@ -15,20 +17,19 @@ const text = `usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
1517

1618

1719
const cliuiCJS = require('../build/index.cjs')
18-
import('../index.mjs').then(({ default: cliuiESM }) => {
19-
describe('consistent wrapping', () => {
20-
it('should produce matching output in cjs and esm', () => {
21-
const uiCJS = cliuiCJS({})
22-
const uiESM = cliuiESM({})
23-
uiCJS.div({
24-
padding: [0, 0, 0, 0],
25-
text,
26-
})
27-
uiESM.div({
28-
padding: [0, 0, 0, 0],
29-
text,
30-
})
31-
uiCJS.toString().should.equal(uiESM.toString())
20+
import cliuiESM from '../index.mjs'
21+
describe('consistent wrapping', () => {
22+
it('should produce matching output in cjs and esm', () => {
23+
const uiCJS = cliuiCJS({})
24+
const uiESM = cliuiESM({})
25+
uiCJS.div({
26+
padding: [0, 0, 0, 0],
27+
text,
3228
})
29+
uiESM.div({
30+
padding: [0, 0, 0, 0],
31+
text,
32+
})
33+
uiCJS.toString().should.equal(uiESM.toString())
3334
})
3435
})

0 commit comments

Comments
 (0)