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

Cannot set property message of ...Error which has only a getter #437

Closed
mknj opened this issue Apr 2, 2018 · 1 comment
Closed

Cannot set property message of ...Error which has only a getter #437

mknj opened this issue Apr 2, 2018 · 1 comment

Comments

@mknj
Copy link

mknj commented Apr 2, 2018

er.message is overwritten multiple times in the code.
This is incompatible with assertion libraries that make er.message readonly(getter, but no setter)

Please make "tap" compatible with "should" or update bdd example with compatible assertion library.

Example

var tap = require('tap')
let should = require('should')

tap.test('hello-world', (tap) => {
  x = -1
  x.should.equal(-2)
  tap.end()
})

Expected

    not ok 1 - AssertionError: expected -1 to be -2

Actual

    not ok 1 - Cannot set property message of AssertionError which has only a getter

Versions

  • "should": "^13.2.1"
  • "tap": "^11.1.3"
  • node v8.10.0
@isaacs isaacs closed this as completed in 7d19266 Jan 23, 2019
@isaacs
Copy link
Member

isaacs commented Jan 23, 2019

Fixed on 12.1.4.

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