UNPKG

561 BJavaScriptView Raw
1var should = require('./init.js');
2
3describe('compound.loadConfigs', function() {
4 it('should load configs from given directory', function() {
5 var app = getApp();
6 var compound = app.compound;
7 compound.loadConfigs(__dirname + '/fixtures/config');
8 should.exists(app.get('database'), 'load database config');
9 app.get('database').driver.should.equal('memory');
10 should.exists(app.get('foo'), 'load extra config');
11 app.get('foo').should.equal('bar');
12 should.not.exists(app.get('hello'));
13 });
14});