mirror of
https://github.com/pieartsy/PluralFlux.git
synced 2026-04-16 17:45:28 +10:00
test setup for messagehelper and webhookhelper
This commit is contained in:
27
tests/helpers/webhookHelper.test.js
Normal file
27
tests/helpers/webhookHelper.test.js
Normal file
@@ -0,0 +1,27 @@
|
||||
jest.mock('../../src/helpers/messageHelper.js')
|
||||
jest.mock('@fluxerjs/core', () => jest.fn());
|
||||
|
||||
const {messageHelper} = require("../../src/helpers/messageHelper.js");
|
||||
const {Message, Webhook, Channel} = require("@fluxerjs/core");
|
||||
const {webhookHelper} = require("../../src/helpers/webhookHelper.js");
|
||||
|
||||
describe('webhookHelper', () => {
|
||||
const authorId = "0001";
|
||||
const authorFull = "author#0001";
|
||||
const attachmentUrl = "../oya.png";
|
||||
const attachmentExpiration = new Date('2026-01-01T00.00.00.0000Z')
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetModules();
|
||||
jest.clearAllMocks();
|
||||
})
|
||||
|
||||
describe(`sendMessageAsMember`, () => {
|
||||
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
// restore the spy created with spyOn
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user