Skip to content

Commit 1fd4f90

Browse files
authored
fix: fixed the broken testcases (#1676)
1 parent 6a101c2 commit 1fd4f90

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode
12
build
23
lib-cov
34
coverage.html

test/basic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('request', function () {
100100

101101
return Promise.all([request_, request_, request_]).then((results) => {
102102
for (const item of results) {
103-
assert.equal(
103+
assert.deepEqual(
104104
item.body,
105105
results[0].body,
106106
'It should keep returning the same result after being called once'

test/node/multipart.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ describe('Multipart', () => {
114114

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

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

0 commit comments

Comments
 (0)