question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Asserting error thrown no longer works as of 2.11

See original GitHub issue

The 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

Repro https://ember-twiddle.com/47c4cfbb571ac3fa83ab912f605ebc6a?fileTreeShown=false&openFiles=tests.integration.components.i-throw-test.js%2C

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:11
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
rwjbluecommented, Nov 28, 2017

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.

2reactions
tzellmancommented, May 3, 2017

Just came across this same issue while attempting to update an addon from ember/cli 2.9. Has anyone found a decent workaround for ember-cli-chai usage?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found