vue3-yuanma/packages/shared/__tests__/normalizeProp.spec.ts
Albert Kaaman 4b551420fc
fix: remove superfluous spaces when normalizing class (#3083)
Co-authored-by: Jacek Karczmarczyk <jkarczm@gmail.com>
2021-02-04 14:41:46 +01:00

18 lines
455 B
TypeScript

import { normalizeClass } from '../src'
describe('normalizeClass', () => {
test('handles string correctly', () => {
expect(normalizeClass('foo')).toEqual('foo')
})
test('handles array correctly', () => {
expect(normalizeClass(['foo', undefined, true, false, 'bar'])).toEqual('foo bar')
})
test('handles object correctly', () => {
expect(normalizeClass({ foo: true, bar: false, baz: true })).toEqual(
'foo baz'
)
})
})