๐ Feature Proposal
A clear and concise description of what the feature is.
When using jest matchers, we get nice output:
describe('atest', () => {
it('tests something', () => {
expect('hello world').toEqual('hello sunshine');
});
});
โ atest โบ tests something
expect(received).toEqual(expected)
Expected value to equal:
"hello sunshine"
Received:
"hello world"
at Object.it (phone-number.test.ts:59:27)
at new Promise (<anonymous>)
at process._tickCallback (internal/process/next_tick.js:68:7)

If I use chai#expect matchers:
describe('atest', () => {
it('tests something', () => {
chai.expect('hello world').to.equal('hello sunshine');
});
});
โ atest โบ tests something
AssertionError: expected 'hello world' to equal 'hello sunshine'
at Object.it (phone-number.test.ts:60:35)
at new Promise (<anonymous>)
at process._tickCallback (internal/process/next_tick.js:68:7)

When I run the same chai test in mocha:
2) atest
tests something:
AssertionError: expected 'hello world' to equal 'hello sunshine'
+ expected - actual
-hello world
+hello sunshine
at Context.<anonymous> (test\src\utilities\omitFrom.test.ts:31:49)

From my understanding, the issue lies with Jest not taking any advantage of information provided by Chai, as Chai exposes expected & received information as part of the thrown assertion error, meaning it's on the testing system to utilise that information.
Personally, this is the biggest showstopper for me switching to Jest :)
In addition, WebStorm shows a diff for some Jest matches, but not for chai matchers (whereas it does show a diff for chai in mocha, as evident in my previous screenshot).
I'm not sure what's required for this to be supported, but figure its related to the way Jest formats its output? (@segrey it'd be great if you could provide any info on this, if possible).
My efforts right now are hampered somewhat by #8118, so I can't be sure of how functional my test suites are right now ๐
๐ Feature Proposal
A clear and concise description of what the feature is.
When using jest matchers, we get nice output:
If I use
chai#expectmatchers:When I run the same chai test in mocha:
From my understanding, the issue lies with Jest not taking any advantage of information provided by Chai, as
Chaiexposes expected & received information as part of the thrown assertion error, meaning it's on the testing system to utilise that information.Personally, this is the biggest showstopper for me switching to Jest :)
In addition, WebStorm shows a diff for some Jest matches, but not for chai matchers (whereas it does show a diff for chai in mocha, as evident in my previous screenshot).
I'm not sure what's required for this to be supported, but figure its related to the way Jest formats its output? (@segrey it'd be great if you could provide any info on this, if possible).
My efforts right now are hampered somewhat by #8118, so I can't be sure of how functional my test suites are right now ๐