add unit test for isInDisplayBounds and config.js (#66)

* add unit test for util: isInDisplayBounds

* add tests for config.js
This commit is contained in:
Lynn
2017-04-26 09:46:15 -07:00
committed by GitHub
parent a9bcb275b1
commit 5d3377ec02
9 changed files with 354 additions and 50 deletions

View File

@@ -158,10 +158,10 @@ function saveUserConfig(fieldName, newValue, oldConfig) {
if (err) {
reject(err);
} else {
resolve();
resolve(newConfig);
}
});
});
}
module.exports = { getConfigField, updateConfigField };
module.exports = { getConfigField, updateConfigField, configFileName };

View File

@@ -2,6 +2,7 @@
const electron = require('electron');
/**
* Returns true if given rectangle is contained within the workArea of at
* least one of the screens.

View File

@@ -348,6 +348,7 @@ function sendChildWinBoundsChange(window) {
let newBounds = getWindowSizeAndPosition(window);
if (newBounds && boundsChangeWindow) {
newBounds.windowName = window.winName;
// ipc msg back to renderer to inform bounds has changed.
boundsChangeWindow.send('boundsChange', newBounds);
}
}