UNPKG

shamjs

Version:
19 lines (18 loc) 503 B
var expect = require('expect.js') var sham = require('../../lib/index') var util = require('../../lib/util/test') var gabble = util.gabble describe('random/id.js', function () { it('defalut count 24', function () { gabble(function () { expect(sham.r.id().length).to.eql(24) }) }) it('a-z 0-9', function () { gabble(function () { expect( sham.r.id().replace(/([a-z0-9])/g,'').length ).to.eql(0) }) }) })