console.assert not throwing with v22.4.0
See original GitHub issueAccording to NodeJS v8.x doc:
a falsy assertion will cause an
AssertionError
to be thrown
console.assert(false)
does not throw with v22.4.0 (was working at least with v22.1.4):
// Does not work anymore
expect(() => console.assert(false, 'message')).toThrow('message');
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
console.assert() - Web APIs | MDN
The console.assert() method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.
Read more >@tkrotoff/fetch-web-example - CodeSandbox
... [console.assert not throwing with v22.4.0](https:\u002F\u002Fgithub.com\ ... assert;\n\n(window.fetch as any) = () =\u003E {\n throw new ...
Read more >@jest/console | Yarn - Package Manager
Fixes for global built in objects in jest-environment-node . Create mock objects in the vm context instead of the parent context. .babelrc is...
Read more >How can we fix 'TypeError: $.console.assert is not a function ...
I am running tests for a component that is build using third party library 'openseadragon' and it shows me error TypeError: $.console.assert ......
Read more >2022 Changelog | ClickHouse Docs
This feature is under development and the queries are not effective as of ... Fix the case when the s3Cluster function throws NOT_FOUND_COLUMN_IN_BLOCK ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
😆 I’m too used to my internal stuff
@mjesun Actually the default env is
jest-environment-jsdom
😄 https://github.com/facebook/jest/blob/497be7627ef851c947da830d4a8e21046f847a78/packages/jest-config/src/defaults.js#L63 But I agree with the rest. Anybody willing to send a PR with a fix and a test?