Add screen.getPrimaryDisplay() API.
This commit is contained in:
parent
e09a2ff811
commit
4ae2738ce5
3 changed files with 34 additions and 2 deletions
|
@ -5,5 +5,12 @@ describe 'screen module', ->
|
|||
describe 'screen.getCursorScreenPoint()', ->
|
||||
it 'returns a point object', ->
|
||||
point = screen.getCursorScreenPoint()
|
||||
assert typeof(point.x), 'number'
|
||||
assert typeof(point.y), 'number'
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue