mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
fix(selectMenu): allow json to be used for select menu options (#8322)
This commit is contained in:
@@ -149,6 +149,17 @@ describe('Select Menu Components', () => {
|
||||
}).toThrowError();
|
||||
});
|
||||
|
||||
test('GIVEN valid option types THEN does not throw', () => {
|
||||
expect(() =>
|
||||
selectMenu().addOptions({
|
||||
label: 'test',
|
||||
value: 'test',
|
||||
}),
|
||||
).not.toThrowError();
|
||||
|
||||
expect(() => selectMenu().addOptions(selectMenuOption().setLabel('test').setValue('test'))).not.toThrowError();
|
||||
});
|
||||
|
||||
test('GIVEN valid JSON input THEN valid JSON history is correct', () => {
|
||||
expect(
|
||||
new SelectMenuBuilder(selectMenuDataWithoutOptions)
|
||||
|
||||
Reference in New Issue
Block a user