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

Unexpected result from assert.fail #34

Closed
don01001000 opened this issue Oct 19, 2017 · 1 comment
Closed

Unexpected result from assert.fail #34

don01001000 opened this issue Oct 19, 2017 · 1 comment

Comments

@don01001000
Copy link

It seems to me based on the documentation that assert.fail(message) should throw an exception for which the message property is just the message passed in. However, it's being set to whatever messaged is wrapped in single quotes and followed by undefined undefined.

The output of the above program is as follows:

{ [AssertionError: 'boom' undefined undefined]
  name: 'AssertionError',
  actual: 'boom',
  expected: undefined,
  operator: undefined,
  message: '\'boom\' undefined undefined',
  generatedMessage: true }

According to the documentation:

If message is provided only it will be used as the error message, the other arguments will be stored as properties on the thrown object.

@BridgeAR
Copy link
Member

This is resolved by #44. Please update to v2.0.0.

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

2 participants