Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError is truncated and not very helpful #163

Closed
wojciechczerniak opened this issue Jun 21, 2015 · 2 comments
Closed

AssertionError is truncated and not very helpful #163

wojciechczerniak opened this issue Jun 21, 2015 · 2 comments

Comments

@wojciechczerniak
Copy link

Hello, I have a problem with not that useful assertion error message:
expected { Object (firstName, lastName, ...) } to have keys 'countryCode', 'stateCode', 'zipCode', 'city', 'firstName', 'lastName', 'email', 'phone', 'line1', 'line2', 'company', and 'vatNumber'
It's a guessing game what's missing.

While Mocha runner does the same and hides the object, Webstorm (I guess) adds a link at the end "Click to see difference":
AssertionError: expected { Object (firstName, lastName, ...) } to have keys 'countryCode', 'stateCode', 'zipCode', 'city', 'firstName', 'lastName', 'email', 'phone', and 'line1' <Click to see difference>

which opens this window:
wallaby_more_info_needed

Can Wallaby have the same window/link when I click red icon?

Assertion I use in Chai.js that gives the error above:
expect(address).to.have.all.keys([ 'countryCode', 'stateCode', 'zipCode', 'city', 'firstName', 'lastName', 'email', 'phone', 'line1', 'line2', 'company', 'vatNumber' ]);

I can check every key separately as a workaround. But I think that comparison window is a great addition anyway.

@ArtemGovorov
Copy link
Member

Done, available in 1.0.21.

assert

@ArtemGovorov
Copy link
Member

Forgot to update node.js integration, now works for it as well as for browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants