Skip to content

armgit / boop

Public Imported from GitHub
0

A tiny, self-hosted notification inbox for developers. Something happened in one of your apps; Boop tells you on your phone.

HTML
470 B
Raw Blame
import { describe, it, expect } from 'vitest'
import { parseIcon } from './icons'

describe('parseIcon', () => {
  it('parses shape:color', () => {
    expect(parseIcon('triangle:mint')).toEqual({ shape: 'triangle', color: 'mint' })
  })
  it('rejects unknown values and free text', () => {
    expect(parseIcon('star:mint')).toBeNull()
    expect(parseIcon('circle:red')).toBeNull()
    expect(parseIcon('🚀')).toBeNull()
    expect(parseIcon('')).toBeNull()
  })
})