diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/socket_cursor.js | 8 | ||||
-rw-r--r-- | tests/socket_fetch.js | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/socket_cursor.js b/tests/socket_cursor.js new file mode 100644 index 0000000..dc0ca7f --- /dev/null +++ b/tests/socket_cursor.js @@ -0,0 +1,8 @@ +// Tests Socket.cursor and Socket.on('cursor') + +socket = require('../socket'); + +world = new socket.Socket(); + +world.on('open', ()=>{world.cursor([22,23])}); +world.on('cursor', (locs, send)=>{console.log(locs,send)}); diff --git a/tests/socket_fetch.js b/tests/socket_fetch.js new file mode 100644 index 0000000..a613dc6 --- /dev/null +++ b/tests/socket_fetch.js @@ -0,0 +1,8 @@ +// Tests Socket.fetch and Socket.on('fetch') +const socket = require('../socket'); + +let world = new socket.Socket(); + +world.on('open', () => {world.fetch([[10,10,10,10]])}); + +world.on('fetch', (tiles) => {console.log(tiles);}) |