mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
rest: prefer arrayBuffer over buffer (#7318)
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user