Skip to content

Commit

Permalink
test: add again afterAll process.exit
Browse files Browse the repository at this point in the history
  • Loading branch information
theoludwig committed Sep 16, 2024
1 parent 36a8105 commit e89e59e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ const skipOnWindows = [
'tensorflow.js',
]

const skipOnMacOS = [
// https://github.com/Level/leveldown/issues/801
'leveldown.js'
]

let nccRun;
if (coverage) {
nccRun = require(__dirname + "/../src/cli.js");
Expand Down Expand Up @@ -44,8 +49,8 @@ for (const integrationTest of fs.readdirSync(__dirname + "/integration")) {
// ignore a few tests known to fail on windows
if (process.platform === 'win32' && skipOnWindows.includes(integrationTest)) continue;

// ignore leveldown.js test on macOS, https://github.com/Level/leveldown/issues/801
if (process.platform === 'darwin' && integrationTest === 'leveldown.js') continue;
// ignore a few tests known to fail on macOS
if (process.platform === 'darwin' && skipOnMacOS.includes(integrationTest)) continue;

it(`should execute "ncc run ${integrationTest}"`, async () => {
let expectedStdout;
Expand Down Expand Up @@ -113,6 +118,11 @@ it(`should execute "ncc build web-vitals" with target config`, async () => {
await new Promise(resolve => setTimeout(resolve, 5000));
});

afterAll(() => {
if (coverage)
process.exit(0);
});

// remove me when node.js makes this the default behavior
process.on("unhandledRejection", e => {
throw e;
Expand Down

0 comments on commit e89e59e

Please sign in to comment.