1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-13 05:25:58 +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

View File

@@ -9,7 +9,8 @@
"phb": "node scripts/phb.js",
"prod": "set NODE_ENV=production&& npm run build",
"postinstall": "npm run build",
"start": "node server.js"
"start": "node server.js",
"test": "mocha --recursive test"
},
"author": "stolksdorf",
"license": "MIT",

0
test/brew.datatest.js Normal file
View File

1
test/config/testing.json Normal file
View File

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

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();
});
});
},
};