spec.mime.js
This file
Path
spec/spec.mime.js
37 lines · 964 bytes · JavaScript
Last changed by
Renaming some spec filesvisionmediabefore adoption340cd1d
History of this fileTake it
Renaming some spec filesvisionmediabefore adoption340cd1d
lines 1–37why, one step back12describe 'Express'3 before_each4 reset()5 end6 7 describe 'mime()'8 describe 'when given an extension with leading dot'9 it 'should return the associated mime type'10 mime('.png').should.eql 'image/png'11 end12 end13 14 describe 'when given an extension without leading dot'15 it 'should return the associated mime type'16 mime('png').should.eql 'image/png'17 end18 end19 20 describe 'when given a file path'21 it 'should return the associated mime type'22 mime('/path/to/an/image.png').should.eql 'image/png'23 end24 end25 26 describe 'when given an unknown extension'27 it 'should default to the "default mime type" setting'28 set('default mime type', 'text/plain')29 mime('meow').should.eql 'text/plain'30 end31 32 it 'should default to "application/octet-stream" otherwise'33 mime('meow').should.eql 'application/octet-stream'34 end35 end36 end37end