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

propteries() fails when passing custom error message #231

Open
jwerre opened this issue Nov 26, 2018 · 0 comments
Open

propteries() fails when passing custom error message #231

jwerre opened this issue Nov 26, 2018 · 0 comments

Comments

@jwerre
Copy link

jwerre commented Nov 26, 2018

Assertion#properties() should pass but is throwing an error when a custom message is passed. For Example:

({
	firstName: "Luke",
	lastName: "Skywalker",
	occupation: "Jedi Master",
	favoriteBook: "The Force for Dummies"
}).should.have.properties([
	'firstName',
	'lastName',
	'occupation',
	'favoriteBook'
],
"The dark side I sense in you.");


Uncaught AssertionError: expected Object {
	firstName: 'Luke',
	lastName: 'Skywalker',
	occupation: 'Jedi Master',
	favoriteBook: 'The Force for Dummies'
} to have properties Array [ 'firstName', 'lastName', 'occupation', 'favoriteBook' ]
, 'The dark side I sense in you.'

If you remove the custom error message it will pass as it should.

Node.js v8.12.0
Should.js v11.2.1

This may be related to: #228

@jwerre jwerre changed the title propteries() fails when passing custom error message propteries() fails when passing custom error message Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant