mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 09:20:51 +08:00
1d13ebb05d
* feat: drop jest * test: remove ssr * test: rename * chore: update tsconfig
17 lines
572 B
TypeScript
17 lines
572 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { cubic, easeInOutCubic } from '..'
|
|
|
|
describe('animation', () => {
|
|
it('cubic should work', () => {
|
|
expect(cubic(1)).toMatchInlineSnapshot('1')
|
|
expect(cubic(5)).toMatchInlineSnapshot('125')
|
|
expect(cubic(10)).toMatchInlineSnapshot('1000')
|
|
})
|
|
|
|
it('easeInOutCubic should work', () => {
|
|
expect(easeInOutCubic(1)).toMatchInlineSnapshot('1')
|
|
expect(easeInOutCubic(0.8).toFixed(4)).toMatchInlineSnapshot('"0.9680"')
|
|
expect(easeInOutCubic(0.4).toFixed(4)).toMatchInlineSnapshot('"0.2560"')
|
|
})
|
|
})
|