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 fileTake it
1234567891011121314151617181920212223
describe 'Express' describe 'StaticFile' before StaticFile = require('express/static').File end describe '#init' it 'should accept and assign #path' (new StaticFile('/foo/bar')).path.should.eql '/foo/bar' end it 'should throw an InvalidPathError when .. is found' // TODO: use throw_error when fixed... try { new StaticFile('/../foobar') } catch (e) { e.name.should.eql 'InvalidPathError' e.message.should.eql "`/../foobar' is not a valid path" } end end endend