ember render hbs swallowing thrown error

前端 未结 1 906
广开言路
广开言路 2021-01-02 23:44

I have a simple component integration test:

test(\'it throws error my-custom-input is called\', function(assert) {
    assert.throws(() => {
        this.         


        
相关标签:
1条回答
  • 2021-01-03 00:29

    Well I am not quite sure why Ember community decided to break the test explained; but here is the fix if anyone needs it.

    You need to install ember-qunit-assert-helpers via

    ember install ember-qunit-assert-helpers
    

    You need to change your code that throws an exception to Ember.assert and in your test class you just need to use assert.expectAssertion instead of assert.throws.

    The answer is provided from the github issue at the following address.

    0 讨论(0)
提交回复
热议问题