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: fixed the broken testcases #1676

Merged
merged 1 commit into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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