mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-12 14:03:57 -04:00
Use async require with coreExample extension. Log a warning when attempting to load a non-built in extension synchronously. Simplify unit test.
This commit is contained in:
parent
061b0b081f
commit
eccdeff2ce
2 changed files with 18 additions and 18 deletions
test/unit
|
@ -75,11 +75,8 @@ test('local, sync', t => {
|
|||
const c = dispatch.callSync('SyncDispatchTest', 'doubleArgument', 123);
|
||||
t.equal(c, 246);
|
||||
|
||||
try {
|
||||
dispatch.callSync('SyncDispatchTest', 'throwException');
|
||||
} catch (e) {
|
||||
t.equal(e.message, 'This is a test exception thrown by DispatchTest');
|
||||
}
|
||||
t.throws(() => dispatch.callSync('SyncDispatchTest', 'throwException'),
|
||||
new Error('This is a test exception thrown by DispatchTest'));
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue