mirror of
https://github.com/zebrajr/express.git
synced 2026-01-15 12:15:27 +00:00
added "view cache" in production test
This commit is contained in:
16
test/app.js
16
test/app.js
@@ -53,4 +53,20 @@ describe('app.path()', function(){
|
||||
blog.path().should.equal('/blog');
|
||||
blogAdmin.path().should.equal('/blog/admin');
|
||||
})
|
||||
})
|
||||
|
||||
describe('in development', function(){
|
||||
it('should disable "view cache"', function(){
|
||||
var app = express();
|
||||
app.enabled('view cache').should.be.false;
|
||||
})
|
||||
})
|
||||
|
||||
describe('in production', function(){
|
||||
it('should enable "view cache"', function(){
|
||||
process.env.NODE_ENV = 'production';
|
||||
var app = express();
|
||||
app.enabled('view cache').should.be.true;
|
||||
process.env.NODE_ENV = 'test';
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user