Skip to content

Commit

Permalink
Fix a unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
KittySparkles committed Aug 4, 2024
1 parent 0cdfd29 commit e24536e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bot/commands/deckadvice/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Bot — /deckadvice', () => {
expect(output.ephemeral).toBeTruthy()
expect(embed.title).toBe('💎 Deck Advice')
expect(embed.description).toBe(
'There was an error evaluating the given deck ID.'
'There was an error evaluating the given deck ID.',
)
})

Expand All @@ -22,21 +22,21 @@ describe('Bot — /deckadvice', () => {
expect(output.ephemeral).toBeTruthy()
expect(embed.title).toBe('💎 Deck Advice')
expect(embed.description).toBe(
'There was an error evaluating some of the cards.'
'There was an error evaluating some of the cards.',
)
})

it('should return advice for a given deck', async () => {
const interaction = mockInteraction({
deck: '5n35n125n163w54n184w95w125w133n394w153w194w21',
deck: '5n35n124w95n163w54n185w124w155w133n393w191w23',
})
const output = await command.execute(interaction, client)
const embed = output.embeds[0].data

expect(output.ephemeral).toBeTruthy()
expect(embed.title).toBe('💎 Deck Advice')
expect(embed.url).toContain(
'https://stormbound-kitty.com/deck/5n35n125n163w54n184w95w125w133n394w153w194w21/detail'
'https://stormbound-kitty.com/deck/5n35n125n163w54n184w95w125w133n394w153w194w21/detail',
)
expect(embed.fields.length).toBeGreaterThan(0)
})
Expand Down

0 comments on commit e24536e

Please sign in to comment.