From 7c8e39defbafdd6312a04a2d30750d647a3ab22b Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 14 Jun 2024 20:31:05 -0500 Subject: [PATCH] fix tests --- test/handlers.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/handlers.test.ts b/test/handlers.test.ts index a00117b..2428df7 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() }) }