1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-20 19:01:29 +00:00

config file for tests

This commit is contained in:
Scott Tolksdorf
2017-01-06 01:34:34 -05:00
parent 174c2973f7
commit 7b38bccec1
3 changed files with 11 additions and 2 deletions

3
test/config.json Normal file
View File

@@ -0,0 +1,3 @@
{
"log_level" : "silent"
}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1,8 +1,15 @@
require('app-module-path').addPath('./server'); require('app-module-path').addPath('./server');
const config = require('nconf')
.argv()
.env({ lowerCase: true })
.file('testing', { file: `test/config.json` })
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
.file('defaults', { file: 'config/default.json' });
const should = require('chai').use(require('chai-as-promised')).should(); const should = require('chai').use(require('chai-as-promised')).should();
const log = require('loglevel'); const log = require('loglevel');
log.setLevel('trace'); log.setLevel(config.get('log_level'));
module.exports = { module.exports = {
should: should should: should