config test
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 8a91749 · Browse files · 3 files·+62 added−23 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+62 added−23 removed
- tests:+62 added−23 removed
Provenance
- Commit
51a5c82- Tree
c33b12f- Author
Tj Holowaychuk <tj@vision-media.ca>- Committer
Tj Holowaychuk <tj@vision-media.ca>- Parent
8a91749
3 files changed+62 added−23 removed
added:test/config.js+41 added
1234567891011121314151617181920212223242526272829303132333435363738394041
var express = require('../') , assert = require('assert');
describe('config', function(){ describe('.set()', function(){ it('should set a value', function(){ var app = express(); app.set('foo', 'bar').should.equal(app); }) })
describe('.get()', function(){ it('should return undefined when unset', function(){ var app = express(); assert(undefined === app.get('foo')); }) it('should otherwise return the value', function(){ var app = express(); app.set('foo', 'bar'); app.get('foo').should.equal('bar'); }) })
describe('.enable()', function(){ it('should set the value to true', function(){ var app = express(); app.enable('tobi').should.equal(app); app.get('tobi').should.be.true; }) }) describe('.disable()', function(){ it('should set the value to false', function(){ var app = express(); app.disable('tobi').should.equal(app); app.get('tobi').should.be.false; }) })})No newline at end of fileadded:test/exports.js+21 added
123456789101112131415161718192021
var express = require('../');
describe('exports', function(){ it('should have .version', function(){ express.should.have.property('version'); }) it('should expose connect middleware', function(){ express.should.have.property('bodyParser'); express.should.have.property('session'); express.should.have.property('static'); }) it('should expose HTTP methods', function(){ express.methods.should.be.an.instanceof(Array); express.methods.should.contain('get'); express.methods.should.contain('put'); express.methods.should.contain('post'); })})deleted:test/express.js-23 removed
1234567891011121314151617181920212223
var express = require('../');
describe('express', function(){ describe('exports', function(){ it('should have .version', function(){ express.should.have.property('version'); }) it('should expose connect middleware', function(){ express.should.have.property('bodyParser'); express.should.have.property('session'); express.should.have.property('static'); }) it('should expose HTTP methods', function(){ express.methods.should.be.an.instanceof(Array); express.methods.should.contain('get'); express.methods.should.contain('put'); express.methods.should.contain('post'); }) })})No newline at end of file