From 86714bf3a4c0c4c66147b9bd8ba48727d57f6972 Mon Sep 17 00:00:00 2001 From: Damon Oehlman Date: Thu, 2 Apr 2015 20:09:04 +1100 Subject: [PATCH] Some basic tests to get the ball rolling --- test/all.js | 1 + test/mouse.js | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 test/all.js create mode 100644 test/mouse.js diff --git a/test/all.js b/test/all.js new file mode 100644 index 00000000..f95031af --- /dev/null +++ b/test/all.js @@ -0,0 +1 @@ +require('./mouse'); \ No newline at end of file diff --git a/test/mouse.js b/test/mouse.js new file mode 100644 index 00000000..1ec708bd --- /dev/null +++ b/test/mouse.js @@ -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'); +}); \ No newline at end of file