mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
feat/abstractiti (#340)
* progress on better error handling * wiring onError callback through module loader and resolver * fix error callbacks not being stored * update onError to be record * type alias * wiring * seems to work * update error handling contract and wire more * add command error builder * fix merge * progress on error handling * naive onError handling, not tested * progres * proress * progress on abstracting away iti * seems to work * fix tests * better typings * add doc * abstracting iti * remove onerror for this pr * feat: better way to add dependencies * fix tests
This commit is contained in:
@@ -29,14 +29,14 @@ describe('eventDispatcher standard', () => {
|
||||
});
|
||||
|
||||
it('should throw', () => {
|
||||
expect(() => eventDispatcher(m, 'not event emitter')).toThrowError();
|
||||
expect(() => eventDispatcher(m, 'not event emitter')).toThrowError();
|
||||
});
|
||||
it("Shouldn't throw", () => {
|
||||
expect(() => eventDispatcher(m, ee)).not.toThrowError();
|
||||
});
|
||||
|
||||
it('Should be called once', () => {
|
||||
const s = eventDispatcher(m, ee);
|
||||
const s = eventDispatcher(m, ee);
|
||||
s.subscribe();
|
||||
ee.emit(m.name, faker.string.alpha());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user