fuzzyworld

explodorama / files / test / toast.test.ts

toast.test.ts

Blame: the commit that last changed each line · file · history

b89399da 2026-11-01 Pavel Safronov1import { describe, expect, it } from 'vitest'
2import { chargeToast } from '../src/ui/toast'
3
4describe('the charge toast (user request, 2026-11-01)', () => {
5 it('says how many were picked up and the total held', () => {
6 expect(chargeToast('Nuke', 3, 5)).toEqual({ title: 'Picked up 3 × Nuke', text: '5 charges in all' })
7 })
8 it('a single pickup with none held is just the name', () => {
9 expect(chargeToast('Shield', 1, 1)).toEqual({ title: 'Picked up Shield', text: '' })
10 })
11 it('one more on top of those held still gives the total', () => {
12 expect(chargeToast('Shield', 1, 2)).toEqual({ title: 'Picked up Shield', text: '2 charges in all' })
13 })
14})