diff --git a/app/app.spec.js b/app/app.spec.js index f41fb11..792b20f 100644 --- a/app/app.spec.js +++ b/app/app.spec.js @@ -106,4 +106,13 @@ describe('AppVue', () => { expect(game.step).toHaveBeenCalledTimes(1) }) }) + + describe('moving the mouse with left button pressed in the viewport', () => { + beforeEach(async () => { + await wrapper.find('div').trigger('mousemove', { x: 0, y: 0, buttons: 1 }) + }) + test('should call game.mouseDown', () => { + expect(game.addCellAtPixel).toHaveBeenCalledTimes(1) + }) + }) }) diff --git a/app/app.vue b/app/app.vue index 271b516..fe3033c 100644 --- a/app/app.vue +++ b/app/app.vue @@ -1,7 +1,10 @@