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 Mar 2, 2024
1 parent a8ce35f commit 8ed3566
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.2.0 - 2024-02-29

### Changed
Expand Down
2 changes: 1 addition & 1 deletion lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ bedrock.events.on('bedrock.started', async () => {
} else {
console.log('All tests passed.');
logger.info('all tests passed.');
bedrock.exit();
await bedrock.shutdown();
}
} 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 @@ -37,7 +37,7 @@
"mocha": "^10.0.0"
},
"peerDependencies": {
"@bedrock/core": "^6.0.0"
"@bedrock/core": "^6.2.0"
},
"directories": {
"lib": "./lib"
Expand Down

0 comments on commit 8ed3566

Please sign in to comment.