Skip to content

Commit

Permalink
test(pnp): ensure a consistent non-zero exit code when extensionless …
Browse files Browse the repository at this point in the history
…import fails
  • Loading branch information
kherock committed Dec 2, 2021
1 parent 26a33db commit a757d96
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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});
Expand Down

0 comments on commit a757d96

Please sign in to comment.