-
Notifications
You must be signed in to change notification settings - Fork 41
/
hydro.conf.js
68 lines (60 loc) · 1.04 KB
/
hydro.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* External dependencies.
*/
var nixt = require('nixt');
var join = require('path').join;
var fs = require('fs');
/**
* TMP path.
*/
var tmp = join(__dirname, 'test', 'tmp');
/**
* Return a new `nixt` instance pointing
* to the todo bin.
*
* @returns {Object}
* @api public
*/
function cli() {
var bin = join(__dirname, 'bin');
var db = join(tmp, 'todos.json');
var path = bin + ':' + process.env.PATH;
return nixt()
.cwd(bin)
.env('TODO_FORMAT', 'mini')
.env('TODO_DB_PATH', db)
.env('PATH', path);
}
/**
* Test setup.
*
* @param {Object} hydro
* @api public
*/
module.exports = function(hydro) {
hydro.set({
formatter: 'hydro-doc',
chai: {
styles: 'should',
stack: true,
plugins: [ 'jack-chai' ],
},
globals: {
cli: cli,
},
cleanDir: {
keepDot: true,
paths: [ tmp ]
},
plugins: [
'hydro-bdd',
'hydro-chai',
'hydro-jack',
'hydro-clean-dir',
'hydro-timekeeper',
],
tests: [
'test/*.js',
]
});
};