forked from PluralFlux/PluralFlux
add frameworks for other tests
This commit is contained in:
22
tests/bot.test.js
Normal file
22
tests/bot.test.js
Normal file
@@ -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();
|
||||
});
|
||||
})
|
||||
12
tests/commands.test.js
Normal file
12
tests/commands.test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
describe('commands', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetModules();
|
||||
jest.clearAllMocks();
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
// restore the spy created with spyOn
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
})
|
||||
12
tests/helpers/importHelper.test.js
Normal file
12
tests/helpers/importHelper.test.js
Normal file
@@ -0,0 +1,12 @@
|
||||
describe('importHelper', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetModules();
|
||||
jest.clearAllMocks();
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
// restore the spy created with spyOn
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user