smartunique/test/test.ts

25 lines
591 B
TypeScript
Raw Normal View History

2017-07-14 15:18:27 +00:00
import { expect, tap } from 'tapbundle'
import * as smartunique from '../dist/index'
2017-07-14 16:53:10 +00:00
tap.test('should create shortid', async () => {
2017-07-17 15:01:10 +00:00
let result = smartunique.shortId()
2017-07-14 16:53:10 +00:00
console.log(result)
})
tap.test('should create uuidv4', async () => {
2017-07-17 15:01:10 +00:00
let result = smartunique.uuid4()
2017-07-14 16:53:10 +00:00
console.log(result)
})
tap.test('should create uuidv5', async () => {
2017-07-17 15:01:10 +00:00
let result = smartunique.uuid5('sometext')
console.log(result)
})
tap.test('should create uuidv5 within namespace', async () => {
let result = smartunique.uuid5('sometext', smartunique.uuid4())
2017-07-14 16:53:10 +00:00
console.log(result)
2017-07-14 15:18:27 +00:00
})
tap.start()