UNPKG

460 BJavaScriptView Raw
1module.exports = require('should');
2
3var Schema = require('jugglingdb').Schema;
4
5global.getConfig = function(options) {
6
7 var dbConf = {
8 database: 'myapp_test',
9 username: 'root'
10 };
11
12 if (options) {
13 for (var el in options) {
14 dbConf[el] = options[el]
15 }
16 }
17
18 return dbConf;
19}
20
21global.getSchema = function(options) {
22 var db = new Schema(require('../'), getConfig(options));
23 return db;
24};