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:
Jacob Nguyen
2023-12-15 16:09:13 -06:00
committed by GitHub
parent 89f6bbb975
commit 77fb00d386
27 changed files with 413 additions and 1153 deletions

View File

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