Skip to content

Commit

Permalink
test(pnp); ensure a non-zero exit code when extensionless import fails
Browse files Browse the repository at this point in the history
  • Loading branch information
kherock committed Dec 2, 2021
1 parent 26a33db commit 2035186
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 2035186

Please sign in to comment.