mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
feat: Premium buttons (#10353)
* feat: premium buttons * docs: deprecation string * feat(InteractionResponses): add deprecation message * feat(builders): add tests * chore: remove @ts-expect-errors * test: update method name * refactor(formatters): stricter types * docs: deprecate method in typings --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { URL } from 'node:url';
|
||||
import { describe, test, expect, vitest } from 'vitest';
|
||||
import {
|
||||
applicationDirectory,
|
||||
chatInputApplicationCommandMention,
|
||||
blockQuote,
|
||||
bold,
|
||||
@@ -313,6 +314,20 @@ describe('Message formatters', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('applicationDirectory', () => {
|
||||
test('GIVEN application id THEN returns application directory store', () => {
|
||||
expect(applicationDirectory('123456789012345678')).toEqual(
|
||||
'https://discord.com/application-directory/123456789012345678/store',
|
||||
);
|
||||
});
|
||||
|
||||
test('GIVEN application id AND SKU id THEN returns SKU within the application directory store', () => {
|
||||
expect(applicationDirectory('123456789012345678', '123456789012345678')).toEqual(
|
||||
'https://discord.com/application-directory/123456789012345678/store/123456789012345678',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Faces', () => {
|
||||
test('GIVEN Faces.Shrug THEN returns "¯\\_(ツ)_/¯"', () => {
|
||||
expect<'¯\\_(ツ)_/¯'>(Faces.Shrug).toEqual('¯\\_(ツ)_/¯');
|
||||
|
||||
Reference in New Issue
Block a user