2016-03-25 20:03:49 +00:00
|
|
|
const assert = require('assert')
|
2017-10-27 00:55:07 +00:00
|
|
|
const {screen} = require('electron')
|
2016-01-12 02:40:23 +00:00
|
|
|
|
2017-10-27 00:55:07 +00:00
|
|
|
describe('screen module', () => {
|
|
|
|
describe('screen.getCursorScreenPoint()', () => {
|
|
|
|
it('returns a point object', () => {
|
|
|
|
const point = screen.getCursorScreenPoint()
|
2016-03-25 20:03:49 +00:00
|
|
|
assert.equal(typeof point.x, 'number')
|
|
|
|
assert.equal(typeof point.y, 'number')
|
|
|
|
})
|
|
|
|
})
|
2016-02-17 01:09:41 +00:00
|
|
|
|
2017-10-27 00:55:07 +00:00
|
|
|
describe('screen.getPrimaryDisplay()', () => {
|
|
|
|
it('returns a display object', () => {
|
|
|
|
const display = screen.getPrimaryDisplay()
|
2016-03-25 20:03:49 +00:00
|
|
|
assert.equal(typeof display.scaleFactor, 'number')
|
|
|
|
assert(display.size.width > 0)
|
|
|
|
assert(display.size.height > 0)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|