mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-14 16:42:35 +02:00
Starting test file for all notifications.
This commit is contained in:
parent
1ff1fc6edf
commit
6be97fbb4d
22 changed files with 396 additions and 0 deletions
18
server/notification-providers/aliyun-sms.spec.js
Normal file
18
server/notification-providers/aliyun-sms.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const AliyunSMS = require("./aliyun-sms");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new AliyunSMS();
|
||||
expect(notification.name).toBe("AliyunSMS");
|
||||
});
|
||||
});
|
18
server/notification-providers/apprise.spec.js
Normal file
18
server/notification-providers/apprise.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Apprise = require("./apprise");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Apprise();
|
||||
expect(notification.name).toBe("apprise");
|
||||
});
|
||||
});
|
18
server/notification-providers/dingding.spec.js
Normal file
18
server/notification-providers/dingding.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const DingDing = require("./dingding");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new DingDing();
|
||||
expect(notification.name).toBe("DingDing");
|
||||
});
|
||||
});
|
18
server/notification-providers/discord.spec.js
Normal file
18
server/notification-providers/discord.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Discord = require("./discord");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Discord();
|
||||
expect(notification.name).toBe("discord");
|
||||
});
|
||||
});
|
18
server/notification-providers/feishu.spec.js
Normal file
18
server/notification-providers/feishu.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Feishu = require("./feishu");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Feishu();
|
||||
expect(notification.name).toBe("Feishu");
|
||||
});
|
||||
});
|
18
server/notification-providers/gotify.spec.js
Normal file
18
server/notification-providers/gotify.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Gotify = require("./gotify");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Gotify();
|
||||
expect(notification.name).toBe("gotify");
|
||||
});
|
||||
});
|
18
server/notification-providers/line.spec.js
Normal file
18
server/notification-providers/line.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Line = require("./line");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Line();
|
||||
expect(notification.name).toBe("line");
|
||||
});
|
||||
});
|
18
server/notification-providers/lunasea.spec.js
Normal file
18
server/notification-providers/lunasea.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const LunaSea = require("./lunasea");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new LunaSea();
|
||||
expect(notification.name).toBe("lunasea");
|
||||
});
|
||||
});
|
18
server/notification-providers/matrix.spec.js
Normal file
18
server/notification-providers/matrix.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Matrix = require("./matrix");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Matrix();
|
||||
expect(notification.name).toBe("matrix");
|
||||
});
|
||||
});
|
18
server/notification-providers/mattermost.spec.js
Normal file
18
server/notification-providers/mattermost.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Mattermost = require("./mattermost");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Mattermost();
|
||||
expect(notification.name).toBe("mattermost");
|
||||
});
|
||||
});
|
18
server/notification-providers/notification-provider.spec.js
Normal file
18
server/notification-providers/notification-provider.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const NotificationProvider = require("./notification-provider");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new NotificationProvider();
|
||||
expect(notification.name).toBe(undefined);
|
||||
});
|
||||
});
|
18
server/notification-providers/octopush.spec.js
Normal file
18
server/notification-providers/octopush.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Octopush = require("./octopush");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Octopush();
|
||||
expect(notification.name).toBe("octopush");
|
||||
});
|
||||
});
|
18
server/notification-providers/promosms.spec.js
Normal file
18
server/notification-providers/promosms.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const PromoSMS = require("./promosms");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new PromoSMS();
|
||||
expect(notification.name).toBe("promosms");
|
||||
});
|
||||
});
|
18
server/notification-providers/pushbullet.spec.js
Normal file
18
server/notification-providers/pushbullet.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Pushbullet = require("./pushbullet");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Pushbullet();
|
||||
expect(notification.name).toBe("pushbullet");
|
||||
});
|
||||
});
|
18
server/notification-providers/pushover.spec.js
Normal file
18
server/notification-providers/pushover.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Pushover = require("./pushover");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Pushover();
|
||||
expect(notification.name).toBe("pushover");
|
||||
});
|
||||
});
|
18
server/notification-providers/pushy.spec.js
Normal file
18
server/notification-providers/pushy.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Pushy = require("./pushy");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Pushy();
|
||||
expect(notification.name).toBe("pushy");
|
||||
});
|
||||
});
|
18
server/notification-providers/rocket-chat.spec.js
Normal file
18
server/notification-providers/rocket-chat.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const RocketChat = require("./rocket-chat");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new RocketChat();
|
||||
expect(notification.name).toBe("rocket.chat");
|
||||
});
|
||||
});
|
18
server/notification-providers/signal.spec.js
Normal file
18
server/notification-providers/signal.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Signal = require("./signal");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Signal();
|
||||
expect(notification.name).toBe("signal");
|
||||
});
|
||||
});
|
18
server/notification-providers/slack.spec.js
Normal file
18
server/notification-providers/slack.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Slack = require("./slack");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Slack();
|
||||
expect(notification.name).toBe("slack");
|
||||
});
|
||||
});
|
18
server/notification-providers/teams.spec.js
Normal file
18
server/notification-providers/teams.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Teams = require("./teams");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Teams();
|
||||
expect(notification.name).toBe("teams");
|
||||
});
|
||||
});
|
18
server/notification-providers/telegram.spec.js
Normal file
18
server/notification-providers/telegram.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Telegram = require("./telegram");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Telegram();
|
||||
expect(notification.name).toBe("telegram");
|
||||
});
|
||||
});
|
18
server/notification-providers/webhook.spec.js
Normal file
18
server/notification-providers/webhook.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
// jest.mock("nodemailer", () => ({
|
||||
// createTransport: jest.fn(),
|
||||
// }));
|
||||
|
||||
// const mockNodeMailer = require("nodemailer");
|
||||
|
||||
const Webhook = require("./webhook");
|
||||
|
||||
beforeEach(() => {
|
||||
// mockNodeMailer.createTransport.mockReset();
|
||||
});
|
||||
|
||||
describe("notification default information", () => {
|
||||
it("should have the correct name", () => {
|
||||
let notification = new Webhook();
|
||||
expect(notification.name).toBe("webhook");
|
||||
});
|
||||
});
|
Loading…
Add table
Reference in a new issue