Skip to content

Commit

Permalink
update testing setup.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 committed Jan 2, 2018
1 parent bcfb2f3 commit e5a5452
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/lib/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,13 @@ function startAdapter(objects, states, callback) {
try {
if (debug) {
// start controller
pid = child_process.exec('node node_modules/' + pkg.name + '/' + pkg.main + ' --console debug', {
pid = child_process.exec('node node_modules/' + pkg.name + '/' + pkg.main + ' --console silly', {
cwd: rootDir + 'tmp',
stdio: [0, 1, 2]
});
} else {
// start controller
pid = child_process.fork('node_modules/' + pkg.name + '/' + pkg.main, ['--console', 'debug'], {
pid = child_process.fork('node_modules/' + pkg.name + '/' + pkg.main, ['--console', 'silly'], {
cwd: rootDir + 'tmp',
stdio: [0, 1, 2, 'ipc']
});
Expand All @@ -485,7 +485,7 @@ function startAdapter(objects, states, callback) {
function startController(isStartAdapter, onObjectChange, onStateChange, callback) {
if (typeof isStartAdapter === 'function') {
callback = onStateChange;
onStateChange = onObjectChange
onStateChange = onObjectChange;
onObjectChange = isStartAdapter;
isStartAdapter = true;
}
Expand Down Expand Up @@ -515,6 +515,9 @@ function startController(isStartAdapter, onObjectChange, onStateChange, callback
"connectTimeout": 2000
},
logger: {
silly: function (msg) {
console.log(msg);
},
debug: function (msg) {
console.log(msg);
},
Expand Down Expand Up @@ -555,9 +558,14 @@ function startController(isStartAdapter, onObjectChange, onStateChange, callback
}
},
logger: {
silly: function (msg) {
console.log(msg);
},
debug: function (msg) {
console.log(msg);
},
info: function (msg) {
console.log(msg);
},
warn: function (msg) {
console.log(msg);
Expand Down

0 comments on commit e5a5452

Please sign in to comment.