mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
refactor(REST): remove double classing (#9722)
* refactor(REST): remove double classing BREAKING CHANGE: `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST` BREAKING CHANGE: `REST#raw` has been removed in favor of `REST#queueRequest` BREAKING CHANGE: `REST#getAgent` has been removed in favor of `REST#agent` * chore: update for /rest changes
This commit is contained in:
@@ -40,7 +40,7 @@ const responseOptions: MockInterceptor.MockResponseOptions = {
|
||||
test('Interaction callback creates burst handler', async () => {
|
||||
mockPool.intercept({ path: callbackPath, method: 'POST' }).reply(200);
|
||||
|
||||
expect(api.requestManager.handlers.get(callbackKey)).toBe(undefined);
|
||||
expect(api.handlers.get(callbackKey)).toBe(undefined);
|
||||
expect(
|
||||
await api.post('/interactions/1234567890123456789/totallyarealtoken/callback', {
|
||||
auth: false,
|
||||
@@ -48,7 +48,7 @@ test('Interaction callback creates burst handler', async () => {
|
||||
}),
|
||||
// TODO: This should be ArrayBuffer, there is a bug in undici request
|
||||
).toBeInstanceOf(Uint8Array);
|
||||
expect(api.requestManager.handlers.get(callbackKey)).toBeInstanceOf(BurstHandler);
|
||||
expect(api.handlers.get(callbackKey)).toBeInstanceOf(BurstHandler);
|
||||
});
|
||||
|
||||
test('Requests are handled in bursts', async () => {
|
||||
|
||||
Reference in New Issue
Block a user