diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js index ee4a009b4..bd5956a60 100644 --- a/src/blocks/scratch3_sensing.js +++ b/src/blocks/scratch3_sensing.js @@ -143,6 +143,7 @@ class Scratch3SensingBlocks { )); if (currentlyAsking) { + this.runtime.emit('SAY', stopTarget, 'say', ''); if (this._questionList.length > 0) { this._askNextQuestion(); } else { diff --git a/test/unit/blocks_sensing.js b/test/unit/blocks_sensing.js index 130b27d0b..a7d9b8ac5 100644 --- a/test/unit/blocks_sensing.js +++ b/test/unit/blocks_sensing.js @@ -67,7 +67,7 @@ test('ask and stop all dismisses question', t => { test('ask and stop other scripts dismisses if it is the last question', t => { const rt = new Runtime(); const s = new Sensing(rt); - const util = {target: {visible: false, sprite: {}}, thread: {}}; + const util = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}}; const expectedQuestion = 'a question'; @@ -94,8 +94,8 @@ test('ask and stop other scripts dismisses if it is the last question', t => { test('ask and stop other scripts asks next question', t => { const rt = new Runtime(); const s = new Sensing(rt); - const util = {target: {visible: false, sprite: {}}, thread: {}}; - const util2 = {target: {visible: false, sprite: {}}, thread: {}}; + const util = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}}; + const util2 = {target: {visible: false, sprite: {}, getCustomState: () => ({})}, thread: {}}; const expectedQuestion = 'a question'; const nextQuestion = 'a followup';