Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ladjs/supertest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.1.1
Choose a base ref
...
head repository: ladjs/supertest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.1.2
Choose a head ref
  • 3 commits
  • 5 files changed
  • 2 contributors

Commits on Jan 24, 2021

  1. Copy the full SHA
    0a06ef1 View commit details

Commits on Jan 25, 2021

  1. Merge pull request #704 from ktutnik/fix-array-flat-issue

    fix: Fix unappropriate stack trace issue on Node.js prior than v14
    niftylettuce authored Jan 25, 2021
    Copy the full SHA
    967aff1 View commit details
  2. 6.1.2

    niftylettuce committed Jan 25, 2021
    Copy the full SHA
    c21ba9a View commit details
Showing with 10 additions and 4 deletions.
  1. +2 −0 .travis.yml
  2. +5 −1 lib/test.js
  3. +1 −1 package-lock.json
  4. +1 −1 package.json
  5. +1 −1 test/supertest.js
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ language: node_js

node_js:
- lts/*
- 12
- 10

before_install:
- npm i
6 changes: 5 additions & 1 deletion lib/test.js
Original file line number Diff line number Diff line change
@@ -80,7 +80,11 @@ function wrapAssertFn(assertFn) {
var err = assertFn(res);
if (err && err.stack) {
badStack = err.stack.replace(err.message, '').split('\n').slice(1);
err.stack = [err.toString(), savedStack, '----', badStack].flat().join('\n');
err.stack = [err.toString()]
.concat(savedStack)
.concat('----')
.concat(badStack)
.join('\n');
}
return err;
};
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supertest",
"version": "6.1.1",
"version": "6.1.2",
"description": "SuperAgent driven library for testing HTTP servers",
"main": "index.js",
"author": "TJ Holowaychuk",
2 changes: 1 addition & 1 deletion test/supertest.js
Original file line number Diff line number Diff line change
@@ -531,7 +531,7 @@ describe('request(app)', function () {
.get('/')
.expect({ stringValue: 'foo', numberValue: 3, nestedObject: { innerString: 5 } })
.end(function (err, res) {
err.message.should.equal('expected {\n stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: 5 }\n} response body, got {\n stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: \'5\' }\n}'); // eslint-disable-line max-len
err.message.replace(/[^a-zA-Z]/g, '').should.equal('expected {\n stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: 5 }\n} response body, got {\n stringValue: \'foo\',\n numberValue: 3,\n nestedObject: { innerString: \'5\' }\n}'.replace(/[^a-zA-Z]/g, '')); // eslint-disable-line max-len
shouldIncludeStackWithThisFile(err);

request(app)