frontend/src/helpers/color/colorFromHex.test.ts

14 lines
269 B
TypeScript
Raw Normal View History

2022-01-01 13:24:06 +00:00
import {test, expect} from 'vitest'
import {colorFromHex} from './colorFromHex'
test('hex', () => {
const color = '#ffffff'
expect(colorFromHex(color)).toBe('ffffff')
})
test('no hex', () => {
const color = 'ffffff'
expect(colorFromHex(color)).toBe('ffffff')
})