2016-02-17 00:46:49 +00:00
|
|
|
const assert = require('assert');
|
|
|
|
const screen = require('electron').screen;
|
2016-01-12 02:40:23 +00:00
|
|
|
|
|
|
|
describe('screen module', function() {
|
|
|
|
describe('screen.getCursorScreenPoint()', function() {
|
|
|
|
return it('returns a point object', function() {
|
2016-02-17 01:09:41 +00:00
|
|
|
var point = screen.getCursorScreenPoint();
|
2016-01-12 02:40:23 +00:00
|
|
|
assert.equal(typeof point.x, 'number');
|
|
|
|
return assert.equal(typeof point.y, 'number');
|
|
|
|
});
|
|
|
|
});
|
2016-02-17 01:09:41 +00:00
|
|
|
|
2016-01-12 02:40:23 +00:00
|
|
|
return describe('screen.getPrimaryDisplay()', function() {
|
|
|
|
return it('returns a display object', function() {
|
2016-02-17 01:09:41 +00:00
|
|
|
var display = screen.getPrimaryDisplay();
|
2016-01-12 02:40:23 +00:00
|
|
|
assert.equal(typeof display.scaleFactor, 'number');
|
|
|
|
assert(display.size.width > 0);
|
|
|
|
return assert(display.size.height > 0);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|