灰烬QUnit-是否有办法从失败的断言中删除堆栈跟踪?

时间:2018-10-28 14:58:53

标签: ember.js qunit ember-qunit ember-testing

每个失败的断言都像这样

Integration | Component | x-form/x-radio-set: it should show errors if validations fail
    ✘ assert.equal(this.$('span').text().trim(), 'is too short (minimum is 4 characters)') at dummy/tests/integration/components/x-form/x-radio-set-test.js:87:4
            at Object.<anonymous> (http://localhost:7357/assets/tests.js:827:10)
            at runTest (http://localhost:7357/assets/test-support.js:4108:30)
            at Test.run (http://localhost:7357/assets/test-support.js:4094:6)
            at http://localhost:7357/assets/test-support.js:4300:12
            at Object.advance (http://localhost:7357/assets/test-support.js:3746:26)
            at begin (http://localhost:7357/assets/test-support.js:5567:20)
         expected is too short (minimum is 4 characters)

其中大量无用的信息使屏幕肿。

我希望有这样的东西:

Integration | Component | x-form/x-radio-set: it should show errors if validations fail
    ✘ assert.equal(this.$('span').text().trim(), 'is too short (minimum is 4 characters)') at dummy/tests/integration/components/x-form/x-radio-set-test.js:87:4
         expected is too short (minimum is 4 characters)

我还使用了ember-qunit-nice-errors,它改善了默认断言消息。

0 个答案:

没有答案