File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1414 "default" : " ./lib/tap.js"
1515 },
1616 "./*" : " ./*" ,
17- "./" : " ./"
17+ "./" : " ./" ,
18+ "./mocha" : " ./lib/mocha.js"
1819 },
1920 "engines" : {
2021 "node" : " >=12"
Original file line number Diff line number Diff line change 55 * Make sure to inspect the output below. Do not ignore changes!
66 */
77'use strict'
8+ exports [ `test/test.mjs TAP mocha export > must match snapshot 1` ] = `
9+ Array [
10+ "after",
11+ "afterEach",
12+ "before",
13+ "beforeEach",
14+ "context",
15+ "default",
16+ "deglobal",
17+ "describe",
18+ "global",
19+ "it",
20+ "specify",
21+ ]
22+ `
23+
824exports [ `test/test.mjs TAP tap > must match snapshot 1` ] = `
925Array [
1026 "Spawn",
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ if (typeof createRequire !== 'function') {
1010 process . exit ( 0 )
1111}
1212
13- const require = createRequire ( import . meta. url ) ;
13+ const require = createRequire ( import . meta. url )
1414
1515const cjs = require ( 'tap' ) ;
1616
@@ -23,3 +23,11 @@ t.test('tap', async t => {
2323 t . equal ( tap [ key ] , key === 'default' ? cjs : cjs [ key ] , key )
2424 }
2525} )
26+
27+ import * as mocha from 'tap/mocha'
28+ t . test ( 'mocha export' , async t => {
29+ t . matchSnapshot ( Object . keys ( mocha ) . sort ( ) )
30+ for ( const key of Object . keys ( mocha ) ) {
31+ t . equal ( mocha [ key ] , key === 'default' ? cjs . mocha : cjs . mocha [ key ] , key )
32+ }
33+ } )
You can’t perform that action at this time.
0 commit comments