File tree 1 file changed +15
-14
lines changed
1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change 2
2
3
3
/* global describe, it */
4
4
5
+ import { createRequire } from 'module'
6
+ const require = createRequire ( import . meta. url )
5
7
require ( 'chai' ) . should ( )
6
8
7
9
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>]
15
17
16
18
17
19
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,
32
28
} )
29
+ uiESM . div ( {
30
+ padding : [ 0 , 0 , 0 , 0 ] ,
31
+ text,
32
+ } )
33
+ uiCJS . toString ( ) . should . equal ( uiESM . toString ( ) )
33
34
} )
34
35
} )
You can’t perform that action at this time.
0 commit comments