Asserting error thrown no longer works as of 2.11
See original GitHub issueThe following test, no longer run after we start to use 2.11.1.
test('it throws error my-custom-input is called', function(assert) {
assert.throws(() => {
this.render(hbs`{{my-custom-input}}`);
}, /my-custom-input component error/, 'Error must have been thrown');
});
I saw mocha users had faced with nearly the same problems: https://github.com/emberjs/ember-mocha/issues/141
SO Question: http://stackoverflow.com/questions/42781085/ember-render-hbs-swallowing-thrown-error Slack Archive: https://embercommunity.slack.com/archives/-testing/p1489479464001332
Issue Analytics
- State:
- Created 7 years ago
- Reactions:11
- Comments:15 (8 by maintainers)
Top Results From Across the Web
How to Check if an Exception Is Raised (or Not) With pytest
And here's how you assert no exception is raised. Solution: Enclose your code in a try/except block and and if the code raises, ......
Read more >How to test the type of a thrown exception in Jest
My current testing framework is AVA and I can test it as a second argument t.throws method, like here: it('should throw Error with...
Read more >AssertJ - fluent assertions java library - GitHub Pages
This chapter answers the question: how to assert that an exception has been thrown and check that it is the expected one? Reference....
Read more >Log4j – Changes - Apache Logging Services
Log4j 1.2 bridge throws a ClassCastException when logging a Map with non-String keys. Fixes LOG4J2-3410. Thanks to Barry Sham, Gary Gregory.
Read more >Changelog - Cypress Documentation
The error "Invalid left-hand-side in assignment" will no longer be thrown when ... and 18.6+ with ES Modules and TypeScript were not working...
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 Free
Top 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
This was fixed by https://github.com/emberjs/ember.js/pull/15871, which essentially reverts https://github.com/emberjs/ember.js/pull/14898 and adds a bunch of tests.
Just came across this same issue while attempting to update an addon from ember/cli
2.9
. Has anyone found a decent workaround forember-cli-chai
usage?