fix tests for switch to callbacks

This commit is contained in:
Thomas Ruoff
2016-03-11 15:23:53 +01:00
parent a64a14419b
commit 90ad436396
3 changed files with 31 additions and 60 deletions

2
swm.js
View File

@@ -8,7 +8,7 @@ function executeCmd(cmd, callback) {
}
function getDevices(callback) {
executeCmd('xrandr', (err, stdout) => callback(err, xrandrParse(stdout)));
executeCmd('xrandr', (err, stdout) => callback(err, err ? null : xrandrParse(stdout)));
}
function switchDevices(xrandrOptions, callback) {