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:
Karishma Chadha 2019-03-26 12:03:00 -04:00
parent 061b0b081f
commit eccdeff2ce
2 changed files with 18 additions and 18 deletions
test/unit

View file

@ -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();
});