25 lines
591 B
TypeScript
25 lines
591 B
TypeScript
import { expect, tap } from 'tapbundle'
|
|
import * as smartunique from '../dist/index'
|
|
|
|
tap.test('should create shortid', async () => {
|
|
let result = smartunique.shortId()
|
|
console.log(result)
|
|
})
|
|
|
|
tap.test('should create uuidv4', async () => {
|
|
let result = smartunique.uuid4()
|
|
console.log(result)
|
|
})
|
|
|
|
tap.test('should create uuidv5', async () => {
|
|
let result = smartunique.uuid5('sometext')
|
|
console.log(result)
|
|
})
|
|
|
|
tap.test('should create uuidv5 within namespace', async () => {
|
|
let result = smartunique.uuid5('sometext', smartunique.uuid4())
|
|
console.log(result)
|
|
})
|
|
|
|
tap.start()
|