mirror of
https://github.com/zhigang1992/react-content-loader.git
synced 2026-05-08 21:23:02 +08:00
* Improv code * feat(Wrap): RTL direction * test(Tests): Code style * test(RTL): Add test
18 lines
396 B
JavaScript
Executable File
18 lines
396 B
JavaScript
Executable File
import { 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")
|
|
})
|
|
})
|