diff --git a/packages/discord.js/typings/index.test-d.ts b/packages/discord.js/typings/index.test-d.ts index 9abeb006c583..8cf019688a45 100644 --- a/packages/discord.js/typings/index.test-d.ts +++ b/packages/discord.js/typings/index.test-d.ts @@ -1337,5 +1337,5 @@ const selectMenu = new SelectMenuComponent({ }); new ActionRow({ - components: [selectMenu, button], + components: [selectMenu.toJSON(), button.toJSON()], }); diff --git a/packages/rest/__tests__/util.ts b/packages/rest/__tests__/util.ts new file mode 100644 index 000000000000..895f021b64d9 --- /dev/null +++ b/packages/rest/__tests__/util.ts @@ -0,0 +1,14 @@ +import { DefaultRestOptions } from '../src'; + +export function genPath(path: string) { + return `/api/v${DefaultRestOptions.version}${path}`; +} + +export function jsonHeaders(headers: Record = {}) { + return { + headers: { + 'content-type': 'application/json', + ...headers, + }, + }; +}