spec.static.js
This file
Path
spec/spec.static.js
18 lines · 431 bytes · JavaScript
Last changed by
Added static file support [#17]visionmediabefore adoption542a90a
History of this fileTake it
Added static file support [#17]visionmediabefore adoption542a90a
lines 1–18why, 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'14 -{ new StaticFile('/../foobar') }.should.throw_error(/InvalidPathError/)15 end16 end17 end18end