Skip to content

Commit 86714bf

Browse files
committed
Some basic tests to get the ball rolling
1 parent 4f4b043 commit 86714bf

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/all.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('./mouse');

test/mouse.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var test = require('tape');
2+
var robot = require('..');
3+
var lastKnownPos;
4+
5+
test('get the initial mouse position', function(t) {
6+
t.plan(3);
7+
t.ok(lastKnownPos = robot.getMousePos(), 'successfully retrieved mouse position');
8+
t.ok(lastKnownPos.x !== undefined, 'mousepos.x is a valid value');
9+
t.ok(lastKnownPos.y !== undefined, 'mousepos.y is a valid value');
10+
});

0 commit comments

Comments
 (0)