format.test.js
This file
Path
test/format.test.js
13 lines · 368 bytes · JavaScript
Last changed by
Fix test coverageAndrey Sitnikbefore adoption9474fd8
History of this fileTake it
The walk stopped after 200 commits: lines older than 3339e7b point at it.
Add shortid and uuid to web demo pageAndrey Sitnikbefore adoption3339e7b
lines 1–3why, one step back1var format = require('../format')23it('generates random string', function () {Fix test coverageAndrey Sitnikbefore adoption9474fd8
line 4why, one step back4 var sequence = [2, 255, 3, 7, 7, 7, 7, 7, 0, 1]Add shortid and uuid to web demo pageAndrey Sitnikbefore adoption3339e7b
line 5why, one step back5 function random (size) {Fix format test for asking long byte sequenceAndrey Sitnikbefore adoption3dbc388
lines 6–10why, one step back6 var bytes = []7 for (var i = 0; i < size; i += sequence.length) {8 bytes = bytes.concat(sequence.slice(0, size - i))9 }10 return bytesAdd shortid and uuid to web demo pageAndrey Sitnikbefore adoption3339e7b
line 11why, one step back11 }Fix test coverageAndrey Sitnikbefore adoption9474fd8
line 12why, one step back12 expect(format(random, 'abcde', 4)).toEqual('cdac')Add shortid and uuid to web demo pageAndrey Sitnikbefore adoption3339e7b
line 13why, one step back13})