We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.0.17
Darwin 23.0.0 arm64 arm
Default example of rejects.toThrow:
rejects.toThrow
https://jestjs.io/docs/expect#rejects
test('rejects to octopus', () => { // make sure to add a return statement return expect(Promise.reject(new Error('octopus'))).rejects.toThrow( 'octopus', ); });
Since both rejects and toThrow listed as supported in bun test doc, test example is expected to work
rejects
toThrow
bun test
Test example fails with error: Expected value must be a function
error: Expected value must be a function
No response
The text was updated successfully, but these errors were encountered:
expect().rejects.toThrow
Successfully merging a pull request may close this issue.
What version of Bun is running?
1.0.17
What platform is your computer?
Darwin 23.0.0 arm64 arm
What steps can reproduce the bug?
Default example of
rejects.toThrow
:https://jestjs.io/docs/expect#rejects
What is the expected behavior?
Since both

rejects
andtoThrow
listed as supported inbun test
doc, test example is expected to workWhat do you see instead?
Test example fails with
error: Expected value must be a function
Additional information
No response
The text was updated successfully, but these errors were encountered: