1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-22 22:22:44 +00:00

Stubbing out test files

This commit is contained in:
Scott Tolksdorf
2017-01-01 10:50:46 -08:00
parent 10f4759471
commit 68ecf749ea
4 changed files with 32 additions and 1 deletions

29
test/test.init.js Normal file
View File

@@ -0,0 +1,29 @@
// initialize config
const config = require('nconf')
.argv()
.env({ lowerCase: true })
.file('testing', { file: `./config/testing.json` })
.file('environment', { file: `../config/${process.env.NODE_ENV}.json` })
.file('defaults', { file: '../config/default.json' });
// other libs
const should = require('chai').use(require('chai-as-promised')).should();
module.exports = {
config: config,
should: should,
clearCache: () => {
return new Promise((resolve, reject) => {
Cache.getRawClientYesIKnowWhatImDoing()
.flushdb((err) => {
if (err) {
return reject(new Error(err));
}
resolve();
});
});
},
};