Skip to content

Commit

Permalink
Wait for the stream to open before setting up a fake path
Browse files Browse the repository at this point in the history
  • Loading branch information
simov committed Jan 24, 2021
1 parent 1419e2b commit 4c7be0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/request/length.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ describe('length', () => {

it('fs error', async () => {
var stream = fs.createReadStream(file.binary)
await new Promise((resolve) => setTimeout(resolve))
stream.path = 'fo'
var options = {headers: {}}
var body = stream
Expand All @@ -197,6 +198,7 @@ describe('length', () => {

it('multipart size fail', async () => {
var stream = fs.createReadStream(file.binary)
await new Promise((resolve) => setTimeout(resolve))
stream.path = 'fo'
var options = {headers: {}}
var body = multipart({
Expand Down

0 comments on commit 4c7be0c

Please sign in to comment.