Something went wrong. Try again.
Browser extension: detect and subscribe to standard.site publications on ATProto substandard.blog
Something went wrong. Try again.
1234567891011121314151617181920212223// The registry's own invariants. The cards themselves draw DOM and are// covered by the popup captures rather than here; what a test can hold is// that the list stays a list of distinct, complete cards.
import { describe, expect, it } from 'vitest'import { CARDS } from './index'
describe('CARDS', () => { it('has a distinct id per card, since ids are what logs name', () => { expect(new Set(CARDS.map((c) => c.id)).size).toBe(CARDS.length) })
it('gives every card the one method the popup always calls', () => { for (const card of CARDS) expect(typeof card.render, card.id).toBe('function') })
it('draws labels first, because the cover sits in front of the rest', () => { // Not cosmetic: the labels card owns #pub-body's visibility, so it has to // have decided before anything inside that body is worth looking at. expect(CARDS[0]?.id).toBe('labels') })})