Skip to content

Commit

Permalink
Use shutdown() for an orderly exit on success.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlehn committed Oct 6, 2023
1 parent 087d6fa commit afc3a8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# bedrock-test ChangeLog

## 9.0.0 - 2023-xx-xx

### Changed
- **BREAKING**: Use `bedrock.shutdown()` for an orderly exit on success.
- An app was abruptly shut down before, even after testing success. Now event
handlers will be called while app is shutting down:
- `bedrock.stop`
- `bedrock.stoped`
- `bedrock.exit`

## 8.1.0 - 2023-04-18

### Changed
Expand Down
2 changes: 1 addition & 1 deletion lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bedrock.events.on('bedrock.started', async () => {
} else {
console.log('All tests passed.');
logger.info('all tests passed.');
bedrock.exit();
await bedrock.shutdown(0);
}
} catch(err) {
console.log('Tests exited with error', err);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"mocha": "^10.0.0"
},
"peerDependencies": {
"@bedrock/core": "^6.0.0"
"@bedrock/core": "^6.1.0"
},
"directories": {
"lib": "./lib"
Expand Down

0 comments on commit afc3a8d

Please sign in to comment.