larsthorup / mocha-vite-puppeteer

Run your Mocha tests with Vite bundler and Puppeteer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test failure reporting

michaelvogt opened this issue · comments

When one of my tests fails, the displayed log entry looks like this:
AssertionError: expected [ Array(16) ] to deeply equal [ Array(16) ]

The respective assertion is:
expect(short).to.be.deep.equal(matrix);

Is there a way to get the values of short and matrix displayed instead of the type?

Good catch!

It seems like a fix could be to include actual and expected properties of the AssertionError being thrown. Something along the line of:
image

Could you verify whether this works for your scenario? Feel free to submit a PR!

@larsthorup

Outputs a diff of the differences at the end of the log. The error line still shows the types only.

Created a pull request: #16 (hope it's correct that way :)

Fixed by #16
Published to npm as v1.8.0

Great, thank you.