Skip to content
Myr

spec.static.js

This file

Path

spec/spec.static.js

23 lines · 585 bytes · JavaScript

Last changed by

Merge branch 'async-plugins'visionmediabefore adoption4c246a4

History of this file

Take it

Added static file support [#17]visionmediabefore adoption542a90a

lines 1–13why, one step back
1
2describe 'Express'3 describe 'StaticFile'4 before5 StaticFile = require('express/static').File6 end7 8 describe '#init'9 it 'should accept and assign #path'10 (new StaticFile('/foo/bar')).path.should.eql '/foo/bar'11 end12 13 it 'should throw an InvalidPathError when .. is found'

Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption3f9cbbb

lines 14–16why, one step back
14 // TODO: use throw_error when fixed...
15 try { new StaticFile('/../foobar') }16 catch (e) {

Merge branch 'async-plugins'visionmediabefore adoption4c246a4

lines 17–18why, one step back
17 e.name.should.eql 'InvalidPathError'
18 e.message.should.eql "`/../foobar' is not a valid path"

Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption3f9cbbb

line 19why, one step back
19 }

Added static file support [#17]visionmediabefore adoption542a90a

lines 20–23why, one step back
20 end
21 end22 end23end