dimanche 28 octobre 2018

Ember QUnit - Is there a way to remove the stacktrace from failed assertions?

Every failed assertion looks like this

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)

Which bloats the screen with pretty much useless information.

I'm expecting to have something like this:

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)


I'm also using ember-qunit-nice-errors which improves a bit the default assertion messages.




Aucun commentaire:

Enregistrer un commentaire