rest: prefer arrayBuffer over buffer (#7318)

This commit is contained in:
Khafra
2022-02-16 02:34:54 -05:00
committed by GitHub
parent c1b27f8eed
commit 868e2f3230
3 changed files with 13 additions and 10 deletions

View File

@@ -205,12 +205,14 @@ test('urlEncoded', async () => {
['code', 'very-invalid-code'],
]);
expect(
await api.post('/urlEncoded', {
body,
passThroughBody: true,
auth: false,
}),
).toStrictEqual(Buffer.from(body.toString()));
new Uint8Array(
(await api.post('/urlEncoded', {
body,
passThroughBody: true,
auth: false,
})) as ArrayBuffer,
),
).toStrictEqual(new Uint8Array(Buffer.from(body.toString())));
});
test('postEcho', async () => {