-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: empty string in arrayBuffer (#447)
* fix: empty string in arrayBuffer * chore: linter
- Loading branch information
Showing
4 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Response } from 'core/request'; | ||
import V4Headers from 'core/request/headers'; | ||
|
||
describe('core/request/response', () => { | ||
test([ | ||
'should successfully handle a request with the Content-Type: application/octet-stream header', | ||
'and an empty response body' | ||
].join(' '), async () => { | ||
|
||
const response = new Response(Promise.resolve(''), { | ||
url: 'url/url', | ||
headers: new V4Headers({ | ||
'Content-Type': 'application/octet-stream' | ||
}) | ||
}); | ||
|
||
await expect(response.decode()).resolves.toBeInstanceOf(ArrayBuffer); | ||
}); | ||
}); |