mirror of
https://github.com/gavvvr/obsidian-imgur-plugin.git
synced 2026-07-22 05:10:27 +00:00
test(unit): add some tests for pseudo-random id generating function
This commit is contained in:
parent
0aa796a3e9
commit
a152aed464
1 changed files with 13 additions and 0 deletions
13
test/pseudo-random-id.test.ts
Normal file
13
test/pseudo-random-id.test.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { generatePseudoRandomId } from '../src/utils/pseudo-random'
|
||||
|
||||
describe(generatePseudoRandomId, () => {
|
||||
it('generates outout of expected default length', () => {
|
||||
expect(generatePseudoRandomId()).toHaveLength(5)
|
||||
})
|
||||
|
||||
it('generates outout of requested length', () => {
|
||||
expect(generatePseudoRandomId(6)).toHaveLength(6)
|
||||
})
|
||||
})
|
||||
Loading…
Reference in a new issue