-
Notifications
You must be signed in to change notification settings - Fork 978
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some basic tests to get the ball rolling
- Loading branch information
1 parent
4f4b043
commit 86714bf
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('./mouse'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var test = require('tape'); | ||
var robot = require('..'); | ||
var lastKnownPos; | ||
|
||
test('get the initial mouse position', function(t) { | ||
t.plan(3); | ||
t.ok(lastKnownPos = robot.getMousePos(), 'successfully retrieved mouse position'); | ||
t.ok(lastKnownPos.x !== undefined, 'mousepos.x is a valid value'); | ||
t.ok(lastKnownPos.y !== undefined, 'mousepos.y is a valid value'); | ||
}); |