mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
feat(utils): update utils naive test (#857)
This commit is contained in:
parent
d7dff4be07
commit
a4f29bebaa
@ -1,5 +1,5 @@
|
||||
import { createHoverColor, createPressedColor } from '../color'
|
||||
import { formatLength, getTitleAttribute } from '..'
|
||||
import { formatLength, getTitleAttribute, largerSize, smallerSize } from '..'
|
||||
|
||||
describe('color', () => {
|
||||
it('should work with createHoverColor', () => {
|
||||
@ -38,4 +38,18 @@ describe('naive', () => {
|
||||
expect(getTitleAttribute({})).toBe(undefined)
|
||||
expect(getTitleAttribute(() => '')).toBe(undefined)
|
||||
})
|
||||
|
||||
it('should work with largerSize', () => {
|
||||
expect(largerSize('tiny')).toBe('small')
|
||||
expect(largerSize('small')).toBe('medium')
|
||||
expect(largerSize('medium')).toBe('large')
|
||||
expect(largerSize('large')).toBe('huge')
|
||||
})
|
||||
|
||||
it('should work with smallerSize', () => {
|
||||
expect(smallerSize('huge')).toBe('large')
|
||||
expect(smallerSize('large')).toBe('medium')
|
||||
expect(smallerSize('medium')).toBe('small')
|
||||
expect(smallerSize('small')).toBe('tiny')
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user