mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-20 21:01:30 +00:00
config file for tests
This commit is contained in:
3
test/config.json
Normal file
3
test/config.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"log_level" : "silent"
|
||||||
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user