test: build plugins as named objects

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-09-16 22:27:15 -05:00
1 parent 3fc761ce16
commit b3152aac45
6 files changed
+107 -63

No files matched your search

+5 -2
View File
@@ -22,8 +22,11 @@ describe('reaching the bus', () => {
const fromOutside: string[] = [];
const fromPlugin: string[] = [];
const observer: Plugin = (api) => {
api.bus.on('request:end', (e) => fromPlugin.push(e.route ?? ''));
const observer: Plugin = {
name: 'bus-observer',
mount(api) {
api.bus.on('request:end', (e) => fromPlugin.push(e.route ?? ''));
},
};
@Module({ mountpoint: '/', controllers: [Ctl] })