Skip to content

Commit

Permalink
fix: fixed the broken testcases (#1676)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunnysunny authored Jan 22, 2022
1 parent 6a101c2 commit 1fd4f90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
build
lib-cov
coverage.html
Expand Down
2 changes: 1 addition & 1 deletion test/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('request', function () {

return Promise.all([request_, request_, request_]).then((results) => {
for (const item of results) {
assert.equal(
assert.deepEqual(
item.body,
results[0].body,
'It should keep returning the same result after being called once'
Expand Down
4 changes: 2 additions & 2 deletions test/node/multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('Multipart', () => {

it('should report ENOENT via the callback', (done) => {
request
.post('http://127.0.0.1:1') // nobody is listening there
.post(`${base}/echo`)
.attach('name', 'file-does-not-exist')
.end((error, res) => {
assert.ok(Boolean(error), 'Request should have failed');
Expand All @@ -125,7 +125,7 @@ describe('Multipart', () => {

it('should report ENOENT via Promise', () => {
return request
.post(`http://127.0.0.1:1`) // nobody is listening there
.post(`${base}/echo`)
.attach('name', 'file-does-not-exist')
.then(
(res) => assert.fail('Request should have failed'),
Expand Down

0 comments on commit 1fd4f90

Please sign in to comment.