-
Notifications
You must be signed in to change notification settings - Fork 790
test(js): fix async assertions and force exit on test completion #5613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,7 +62,7 @@ | |
| "build:clean": "rimraf ./lib", | ||
| "build": "npm-run-all build:clean check compile", | ||
| "build:watch": "tsup-node --watch", | ||
| "test": "tsx --test ./tests/*_test.ts" | ||
| "test": "tsx --test --test-force-exit ./tests/*_test.ts" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| }, | ||
| "peerDependencies": { | ||
| "@ai-sdk/react": "^3.0.0", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
--test-force-exitflag was introduced in Node.js v22.10.0. Since this repository supports Node.js>=20, running tests on Node.js 20 or older Node.js 22 versions will fail with abad option: --test-force-exiterror. It is highly recommended to resolve the underlying resource leaks (such as unclosed servers, active timers, or open handles) instead of forcing the process to exit, to ensure compatibility across all supported Node.js versions.