-
Notifications
You must be signed in to change notification settings - Fork 3
/
wallaby.js
executable file
·71 lines (69 loc) · 2.26 KB
/
wallaby.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
69
70
71
module.exports = function(w) {
return {
files: ["src/*.ts"],
tests: ["src/tests/*.ts"],
compilers: {
"**/*.ts*": w.compilers.typeScript({ module: "commonjs", target: "es5" })
},
env: {
type: "node"
},
testFramework: "mocha",
// preprocessors: {
// "**/*.js*": file => {
// return transform(file.content);
// }
// },
workers: {
initial: 1,
regular: 1
},
/* parallelism may break some tests due to db consistency */
// workers: {
// initial: 1,
// regular: 1,
// recycle: true
// },
delays: {
run: 500
},
setup() {
// configure sinon
var sinon = require("sinon");
// var sinonTest = require('sinon-test');
// sinon.test = sinonTest.configureTest(sinon);
// sinon.testCase = sinonTest.configureTestCase(sinon);
},
teardown: function(wallaby) {}
// preprocessors: {
// "**/*.js*": file => require("babel-core").transform(file.content.replace('(\'assert\')', '(\'power-assert\')'), {
// sourceMap: true,
// presets: ["es2015", "stage-2", "babel-preset-power-assert"]
// })
// },
// setup: function() {
// // setup power asssert
// var Module = require('module').Module;
// if (!Module._originalRequire) {
// const modulePrototype = Module.prototype;
// Module._originalRequire = modulePrototype.require;
// modulePrototype.require = function (filePath) {
// if (filePath === 'empower-core') {
// var originalEmpowerCore = Module._originalRequire.call(this, filePath);
// var newEmpowerCore = function () {
// var originalOnError = arguments[1].onError;
// arguments[1].onError = function (errorEvent) {
// errorEvent.originalMessage = errorEvent.error.message + '\n';
// return originalOnError.apply(this, arguments);
// };
// return originalEmpowerCore.apply(this, arguments);
// };
// newEmpowerCore.defaultOptions = originalEmpowerCore.defaultOptions;
// return newEmpowerCore;
// }
// return Module._originalRequire.call(this, filePath);
// };
// }
// }
};
};