import { describe, expect, it } from 'vitest' import { masonryRowSpan } from '@/features/subject-images/layout' describe('图库瀑布流卡片布局', () => { it('按卡片实际高度计算网格跨度', () => { expect(masonryRowSpan(420, 1, 20)).toBe(21) expect(masonryRowSpan(421, 1, 20)).toBe(21) expect(masonryRowSpan(422, 1, 20)).toBe(22) expect(masonryRowSpan(0, 1, 20)).toBe(1) }) })