Skip to content

propteries() fails when passing custom error message #231

@jwerre

Description

@jwerre

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions