element-plus/packages/utils/__tests__/rand.vitest.ts

13 lines
301 B
TypeScript
Raw Normal View History

2022-04-12 22:50:34 +08:00
import { describe, expect, it } from 'vitest'
import { generateId, getRandomInt } from '..'
describe('rand', () => {
it('generateId should work', () => {
expect(generateId()).to.be.a('number')
})
it('getRandomInt should work', () => {
expect(getRandomInt(1000)).lessThan(1000)
})
})