electron/spec/api-screen-spec.coffee

18 lines
560 B
CoffeeScript
Raw Normal View History

2014-01-07 12:00:25 +00:00
assert = require 'assert'
{screen} = require 'electron'
2014-01-07 12:00:25 +00:00
describe 'screen module', ->
describe 'screen.getCursorScreenPoint()', ->
it 'returns a point object', ->
point = screen.getCursorScreenPoint()
2014-01-07 12:15:55 +00:00
assert.equal typeof(point.x), 'number'
assert.equal typeof(point.y), 'number'
describe 'screen.getPrimaryDisplay()', ->
it 'returns a display object', ->
display = screen.getPrimaryDisplay()
assert.equal typeof(display.scaleFactor), 'number'
assert display.size.width > 0
assert display.size.height > 0