Files
react-content-loader/tests/uid.js
Danilo Woznica f36b10d902 Improvement tests (#76)
* Improvement tests

* Add Istanbul: Code Coverage Tool

* Fix tests

* Uid test

* Removed istanbul in the depencies
2018-01-23 16:05:37 -02:00

18 lines
402 B
JavaScript
Executable File

import chai, { expect } from 'chai'
import uid from '../src/uid'
describe('unique id', () => {
const options = 100
const ids = new Array(options).fill(' ').map(item => uid())
const unique = Array.from(new Set(ids))
it(`should have ${options} diferents ids`, () => {
expect(unique).to.have.length(options)
})
it(`return a string`, () => {
expect(uid()).to.be.a('string')
})
})