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

fix: Check error object before updating stack. (Fixes #700) #705

Merged
merged 1 commit into from Jan 25, 2021
Merged

fix: Check error object before updating stack. (Fixes #700) #705

merged 1 commit into from Jan 25, 2021

Conversation

janthoe
Copy link
Contributor

@janthoe janthoe commented Jan 25, 2021

Checking object returned by the assertion function in order to avoid property access errors when using assertion utilities like Chai, which would result in an error like this:

1) request(app)
       .expect(field, value[, fn])
         handling arbitrary expect functions
           doesn't create false negatives on assertion utilities:
     Error: Should not be called for non Error objects
      at Object.get (test/supertest.js:744:19)
      at ~/github/supertest/lib/test.js:29:367
      at Test._assertFunction (lib/test.js:99:170)
      at Test.assert (lib/test.js:66:173)
      at Server.localAssert (lib/test.js:54:664)
      at emitCloseNT (net.js:1657:8)
      at processTicksAndRejections (internal/process/task_queues.js:79:21)

@janthoe
Copy link
Contributor Author

janthoe commented Jan 25, 2021

@niftylettuce PTAL

@niftylettuce niftylettuce merged commit 8b0bf4d into ladjs:master Jan 25, 2021
@niftylettuce
Copy link
Collaborator

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

@coveralls
Copy link

coveralls commented Jan 25, 2021

Pull Request Test Coverage Report for Build 491

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.447%

Totals Coverage Status
Change from base Build 489: 0.0%
Covered Lines: 146
Relevant Lines: 150

💛 - Coveralls

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

Successfully merging this pull request may close these issues.

None yet

3 participants