Skip to content
Myr

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 file

Take it

The walk stopped after 200 commits: lines older than e5f5254 point at it.

Added default expresso tests to express(1) generated app. Closes #384Tj Holowaychukbefore adoptione5f5254

lines 1–8why, one step back
1
2/**3 * Module dependencies.4 */56var utils = require('express/utils');78module.exports = {

Merge branch 'range'Tj Holowaychukbefore adoptionfab9af2

line 9why, one step back
9 'test .miniMarkdown()': function(assert){

Added default expresso tests to express(1) generated app. Closes #384Tj Holowaychukbefore adoptione5f5254

lines 10–15why, one step back
10 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 back
16 },
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'));

Added default expresso tests to express(1) generated app. Closes #384Tj Holowaychukbefore adoptione5f5254

lines 25–26why, one step back
25 }
26};