import { describe, expect, it } from 'vitest'; import { SYSTEM_COLLECTION_DB_NAME, VOCAB, collectionDisplayName, formatProcessedDestination, } from '../../lib/collection-vocabulary.js'; describe('collection-vocabulary', () => { it('maps system collection rows to Synced binder', () => { expect(collectionDisplayName({ name: SYSTEM_COLLECTION_DB_NAME, isSystemCollection: true })).toBe( VOCAB.SYNCED_BINDER ); expect(collectionDisplayName({ name: SYSTEM_COLLECTION_DB_NAME, is_system_collection: true })).toBe( VOCAB.SYNCED_BINDER ); }); it('passes through user list names', () => { expect(collectionDisplayName({ name: 'Modern Staples' })).toBe('Modern Staples'); }); it('formats scanner processed destinations', () => { expect(formatProcessedDestination('owned')).toBe(VOCAB.MY_COLLECTION); expect(formatProcessedDestination('collection')).toBe(VOCAB.LIST); expect(formatProcessedDestination('deck')).toBe('deck'); }); });