Files
kemal.earthandClaude Opus 5 839c7a9cbb feat(studio): full-screen pricing panel variants (#49640)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Incorporating the parent PR.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 11:53:16 +02:00

32 lines
1.1 KiB
TypeScript

import { describe, expect, it } from 'vitest'
import { getPlanCardsEntryAnimation } from './PlanCards.utils'
describe('getPlanCardsEntryAnimation', () => {
it('returns no animation props when no entry delay is given', () => {
const animation = getPlanCardsEntryAnimation(undefined)
expect(animation.container).toEqual({})
expect(animation.card).toBeUndefined()
})
it('staggers the cards after the container delay', () => {
const animation = getPlanCardsEntryAnimation(0.4)
expect(animation.container.initial).toBe('hidden')
expect(animation.container.animate).toBe('visible')
expect(animation.card).toBeDefined()
const visible = animation.container.variants?.visible as { transition: Record<string, number> }
expect(visible.transition.delayChildren).toBeCloseTo(0.6)
expect(visible.transition.staggerChildren).toBe(0.08)
})
it('treats a zero delay as an animation, not as absent', () => {
const animation = getPlanCardsEntryAnimation(0)
expect(animation.container.initial).toBe('hidden')
expect(animation.card).toBeDefined()
})
})