diff --git a/test/handlers.test.ts b/test/handlers.test.ts index a00117b5..2428df7a 100644 --- a/test/handlers.test.ts +++ b/test/handlers.test.ts @@ -57,8 +57,13 @@ vi.mock('discord.js', async (importOriginal) => { function createRandomPlugin (s: 'go', mut?: Partial) { return CommandInitPlugin(({ module }) => { + if(mut) { + Object.entries(mut).forEach(([k, v]) => { + module[k] = v + }) + } return s == 'go' - ? controller.next(mut) + ? controller.next() : controller.stop() }) }