-
Notifications
You must be signed in to change notification settings - Fork 758
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
Error after upgrade #700
Error after upgrade #700
Comments
Agreed, just had to downgrade to get around this Error: Invalid Chai property: stack. Did you mean "same"?
at Object.proxyGetter [as get] (node_modules/chai/lib/chai/utils/proxify.js:75:17)
at /app/node_modules/supertest/lib/test.js:81:20
at Test._assertFunction (node_modules/supertest/lib/test.js:307:11)
at Test.assert (node_modules/supertest/lib/test.js:197:21)
at Server.localAssert (node_modules/supertest/lib/test.js:155:12)
at Server.EventEmitter.emit (domain.js:483:12)
at emitCloseNT (net.js:1657:8)
at processTicksAndRejections (internal/process/task_queues.js:83:21) |
Just deprecated it on npm - if someone wants to PR the fix and ping me I will accept / merge / release to npm |
does anyone have an example of a test that causes this issue? I have ran supertest 6.1.1 with jest 26.6.3 over multiple projects and not seen these error. |
I think 6.1.2 fixes this |
Given the following example: await request.get(`/api/v1/myResource`)
.send()
.expect(200)
.expect(res => res.body.should.have.property('id')) The error described above happens when the var err = assertFn(res);
if (err && err.stack) {
...
} Then using var err = assertFn(res);
if (err instanceof Error && err.stack) {
...
} |
PR? |
@niftylettuce on the way |
fix: Check error object before updating stack. (Fixes #700)
v6.1.3 released to npm, any further issues please open another issue or submit a PR thanks @janthoe https://github.com/visionmedia/supertest/releases/tag/v6.1.3 |
I am getting following error after upgrading supertest to 6.1.1
What I can do about it?
The text was updated successfully, but these errors were encountered: