Skip to content

Commit

Permalink
Add assertion to smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavohenke committed Jul 20, 2024
1 parent 3b2fadb commit 03aee87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/smoke-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const exec = util.promisify(originalExec);
beforeAll(async () => {
await exec('pnpm build', { cwd: `${__dirname}/..` });
await exec('pnpm install', { cwd: __dirname });
}, 10000);
}, 20000);

it.each(['cjs-import', 'cjs-require', 'esm'])(
'%s',
Expand All @@ -15,7 +15,9 @@ it.each(['cjs-import', 'cjs-require', 'esm'])(
await exec(`tsc -p ${project}`, { cwd: __dirname }).catch((err) =>
Promise.reject(err.stdout),
);
await exec(`node ${project}/dist/smoke-test.js`, { cwd: __dirname });
await expect(
exec(`node ${project}/dist/smoke-test.js`, { cwd: __dirname }),
).resolves.toBeDefined();
},
10000,
);

0 comments on commit 03aee87

Please sign in to comment.