Skip to content

Doesn't work properly with ember-cli-chai #48

@al3xnag

Description

@al3xnag

Problem

Chai assertion expect(3).to.equal(3); replaces with expect(3).to.equal('expect(3).to.equal(3) at my-app/tests/unit/mixins/foo-test.js:x:x');

I don't pretend to have nice errors for chai assertions, at least ember-qunit-nice-errors shouldn't touch them.

Details

$ npm ls ember-cli-chai ember-qunit-nice-errors
├── ember-cli-chai@0.4.2 
└── ember-qunit-nice-errors@1.1.2 
// config/environment.js
'ember-qunit-nice-errors': {
  showFileInfo: true,
  completeExistingMessages: true
},
// /tests/unit/mixins/foo-test.js
import { module, test } from 'qunit';
import { withChai } from 'ember-cli-chai/qunit';

module('Unit | Mixin | foo');

test('it works', withChai(function(expect, assert) {
  expect(3).to.equal(3);
}));
$ ember test -> 

Failed.
expected 3 to equal 'expect(3).to.equal(3) at my-app/tests/unit/mixins/foo-test.js:x:x'@ 5 ms
Expected: "expect(3).to.equal(3) at my-app/tests/unit/mixins/foo-test.js:x:x"
Result: 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions