File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ process.on('exit', async () => {
1919 try {
2020 // Has to be sync.
2121 renameSync ( 'package.json.bak' , 'package.json' )
22- } catch ( /** @type {any } */ error ) {
23- // ignore if not found, which will happen because baseline.js sometimes skips the test
24- if ( error . code !== 'ENOENT' ) throw error
22+ } catch ( error ) {
23+ const exception = /** @type {ErrnoException } */ ( error )
24+ // ignore if not found, which will happen because baseline.js sometimes
25+ // skips the test.
26+ if ( exception . code !== 'ENOENT' ) throw error
2527 }
2628} )
2729
Original file line number Diff line number Diff line change @@ -2,7 +2,13 @@ import assert from 'node:assert/strict'
22import test from 'node:test'
33import { resolve } from '../index.js'
44
5- test ( 'ponyfill' , function ( ) {
5+ test ( 'ponyfill' , async function ( ) {
6+ assert . deepEqual (
7+ Object . keys ( await import ( 'import-meta-resolve' ) ) . sort ( ) ,
8+ [ 'moduleResolve' , 'resolve' ] ,
9+ 'should expose the public api'
10+ )
11+
612 try {
713 // @ts -expect-error
814 resolve ( 'x' )
You can’t perform that action at this time.
0 commit comments