question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error after upgrade

See original GitHub issue

I am getting following error after upgrading supertest to 6.1.1

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 /home/circleci/project/node_modules/supertest/lib/test.js:81:20

What I can do about it?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
niftylettucecommented, Jan 25, 2021

PR?

1reaction
janthoecommented, Jan 25, 2021

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 chai assertion succeeds. The reason is that the result of the arrow function is the chai assertion proxy. At supertest/lib/test.js#L80:

var err = assertFn(res);
if (err && err.stack) {
    ...
 }

Then using err.stack causes chai to throw the error Invalid Chai property: stack. Since err is expected to be an Error object, from SuperTest assertions or Chai assertions, the check should use instanceof instead:

var err = assertFn(res);
if (err instanceof Error && err.stack) {
    ...
 }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Get help with Windows upgrade and installation errors
See some of the most common upgrade and installation errors for Windows 10 and Windows 11, and what you can do to try...
Read more >
If you see an error when you update or restore your iPhone ...
Learn what to do if you see an error code or alert when you use your computer to update or restore your device....
Read more >
Error after Upgrade - QuickBooks - Intuit
You've got me here today to share some more information in fixing the errors that you received after upgrading your QuickBooks.
Read more >
Error after upgrade :-( | Ubiquiti Community
Today i installed 3.4.0 - and i keep seeing a new version to install 3.4.0. I pushed this version and not i am...
Read more >
Error after upgrade - Atlassian Community
Good day, the following error is displayed after ugprade of Confluence: Pre-upgrade validation failed. Check the Confluence application logs for more.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found