From a757d9699f68a6cb09fd6bb978f45f80560497f6 Mon Sep 17 00:00:00 2001 From: Kyle Herock Date: Thu, 2 Dec 2021 14:04:28 -0500 Subject: [PATCH] test(pnp): ensure a consistent non-zero exit code when extensionless import fails --- .../acceptance-tests/pkg-tests-specs/sources/pnp-esm.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/pnp-esm.test.ts b/packages/acceptance-tests/pkg-tests-specs/sources/pnp-esm.test.ts index 104a73173fef..acc863f58ea8 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/pnp-esm.test.ts +++ b/packages/acceptance-tests/pkg-tests-specs/sources/pnp-esm.test.ts @@ -259,7 +259,7 @@ describe(`Plug'n'Play - ESM`, () => { pnpEnableEsmLoader: true, }, async ({path, run, source}) => { - await xfs.writeFilePromise(ppath.join(path, `index.mjs` as Filename), `import('./cjs-bin').then(console.log)`); + await xfs.writeFilePromise(ppath.join(path, `index.mjs` as Filename), `import bin from './cjs-bin';\nconsole.log(bin)`); await xfs.writeFilePromise(ppath.join(path, `cjs-bin` as Filename), `module.exports = {foo: 'bar'}`); await expect(run(`install`)).resolves.toMatchObject({code: 0});