Initial commit of 001code-html Scratch frontend project.
Includes scratch-gui, scratch-vm, scratch-blocks, scratch-render, scratch-l10n, and deployment config. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24
scratch-vm/test/integration/tw_step_events.js
Normal file
24
scratch-vm/test/integration/tw_step_events.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const Runtime = require('../../src/engine/runtime');
|
||||
const {test} = require('tap');
|
||||
|
||||
test('step events', t => {
|
||||
const events = [];
|
||||
const rt = new Runtime();
|
||||
rt.sequencer.stepThreads = () => {
|
||||
events.push('sequencer.stepThreads()');
|
||||
return [];
|
||||
};
|
||||
rt.on('BEFORE_EXECUTE', () => {
|
||||
events.push('BEFORE_EXECUTE');
|
||||
});
|
||||
rt.on('AFTER_EXECUTE', () => {
|
||||
events.push('AFTER_EXECUTE');
|
||||
});
|
||||
rt._step();
|
||||
t.same(events, [
|
||||
'BEFORE_EXECUTE',
|
||||
'sequencer.stepThreads()',
|
||||
'AFTER_EXECUTE'
|
||||
]);
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user