spec.static.js
This file
Path
spec/spec.static.js
22 lines · 526 bytes · JavaScript
Last changed by
Merge branch 'master' of git://github.com/visionmedia/expressciaranjbefore adoption3f9cbbb
History of this fileTake it
Added static file support [#17]visionmediabefore adoption542a90a
lines 1–13why, one step back12describe '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–18why, one step back14 // TODO: use throw_error when fixed...15 try { new StaticFile('/../foobar') }16 catch (e) {17 e.should.be_an_instance_of InvalidPathError18 }Added static file support [#17]visionmediabefore adoption542a90a
lines 19–22why, one step back19 end20 end21 end22end