Files
claude-code/packages/pokemon/src/__tests__/renderer.test.ts
2026-04-21 20:31:10 +08:00

19 lines
409 B
TypeScript

import { describe, expect, test } from 'bun:test'
import { renderAnimatedSprite } from '../sprites/renderer'
describe('renderAnimatedSprite', () => {
test('flip preserves sprite width alignment across rows', () => {
const lines = [
' AB',
' C',
]
const flipped = renderAnimatedSprite(lines, 0, 'flip')
expect(flipped).toEqual([
'\x1b[0mBA \x1b[0m',
'\x1b[0m C \x1b[0m',
])
})
})