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