utils.test.js
This file
Path
test/utils.test.js
26 lines · 1.1 KiB · JavaScript
Last changed by
Merge branch 'range'Tj Holowaychukbefore adoptionfab9af2
History of this fileTake it
The walk stopped after 200 commits: lines older than 0eeef2d point at it.
Style fixesTj Holowaychukbefore adoption0eeef2d
lines 1–8why, one step back12/**3 * Module dependencies.4 */56var utils = require('express/utils');78module.exports = {Merge branch 'range'Tj Holowaychukbefore adoptionfab9af2
line 9why, one step back9 'test .miniMarkdown()': function(assert){Style fixesTj Holowaychukbefore adoption0eeef2d
lines 10–15why, one step back10 assert.equal('<em>foo</em>', utils.miniMarkdown('_foo_'));11 assert.equal('<em>foo</em>', utils.miniMarkdown('*foo*'));12 assert.equal('<strong>foo</strong>', utils.miniMarkdown('**foo**'));13 assert.equal('<strong>foo</strong>', utils.miniMarkdown('__foo__'));14 assert.equal('<em>foo</em>_', utils.miniMarkdown('_foo__'));15 assert.equal('<a href="/login">User Login</a>', utils.miniMarkdown('[User Login](/login)'));Merge branch 'range'Tj Holowaychukbefore adoptionfab9af2
lines 16–24why, one step back16 },17 18 'test .parseRange()': function(assert){19 assert.eql([{start: 0, end: 499 }], utils.parseRange(1000, 'bytes=0-499'));20 assert.eql([{start: 40, end: 80 }], utils.parseRange(1000, 'bytes=40-80'));21 assert.eql([{start: 500, end: 999 }], utils.parseRange(1000, 'bytes=-500'));22 assert.eql([{start: 500, end: 999 }], utils.parseRange(1000, 'bytes=500-'));23 assert.eql([{start: 0, end: 0 }], utils.parseRange(1000, 'bytes=0-0'));24 assert.eql([{start: 999, end: 999 }], utils.parseRange(1000, 'bytes=-1'));Style fixesTj Holowaychukbefore adoption0eeef2d
lines 25–26why, one step back25 }26};