From 0f65db2d42d1b40d2a74e49a8cc246cd4605a7ba Mon Sep 17 00:00:00 2001 From: Aster Fialla Date: Mon, 23 Feb 2026 09:00:48 -0500 Subject: [PATCH] add frameworks for other tests --- tests/bot.test.js | 22 ++++++++++++++++++++++ tests/commands.test.js | 12 ++++++++++++ tests/helpers/importHelper.test.js | 12 ++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 tests/bot.test.js create mode 100644 tests/commands.test.js create mode 100644 tests/helpers/importHelper.test.js diff --git a/tests/bot.test.js b/tests/bot.test.js new file mode 100644 index 0000000..7455ae7 --- /dev/null +++ b/tests/bot.test.js @@ -0,0 +1,22 @@ +const { Client, Events } = require('@fluxerjs/core'); +const { messageHelper } = require("../src/helpers/messageHelper.js"); +const {enums} = require("../src/enums.js"); +const {commands} = require("../src/commands.js"); +const {webhookHelper} = require("../src/helpers/webhookHelper.js"); +const env = require('dotenv'); +const {utils} = require("../src/helpers/utils.js"); + +env.config(); + +describe('bot', () => { + + beforeEach(() => { + jest.resetModules(); + jest.clearAllMocks(); + }) + + afterEach(() => { + // restore the spy created with spyOn + jest.restoreAllMocks(); + }); +}) \ No newline at end of file diff --git a/tests/commands.test.js b/tests/commands.test.js new file mode 100644 index 0000000..d22daab --- /dev/null +++ b/tests/commands.test.js @@ -0,0 +1,12 @@ +describe('commands', () => { + + beforeEach(() => { + jest.resetModules(); + jest.clearAllMocks(); + }) + + afterEach(() => { + // restore the spy created with spyOn + jest.restoreAllMocks(); + }); +}) \ No newline at end of file diff --git a/tests/helpers/importHelper.test.js b/tests/helpers/importHelper.test.js new file mode 100644 index 0000000..5603dff --- /dev/null +++ b/tests/helpers/importHelper.test.js @@ -0,0 +1,12 @@ +describe('importHelper', () => { + + beforeEach(() => { + jest.resetModules(); + jest.clearAllMocks(); + }) + + afterEach(() => { + // restore the spy created with spyOn + jest.restoreAllMocks(); + }); +}) \ No newline at end of file