Browse Source

Starting test file for all notifications.

deefdragon/notif-tests
Jeffrey Koehler 3 years ago
parent
commit
6be97fbb4d
  1. 18
      server/notification-providers/aliyun-sms.spec.js
  2. 18
      server/notification-providers/apprise.spec.js
  3. 18
      server/notification-providers/dingding.spec.js
  4. 18
      server/notification-providers/discord.spec.js
  5. 18
      server/notification-providers/feishu.spec.js
  6. 18
      server/notification-providers/gotify.spec.js
  7. 18
      server/notification-providers/line.spec.js
  8. 18
      server/notification-providers/lunasea.spec.js
  9. 18
      server/notification-providers/matrix.spec.js
  10. 18
      server/notification-providers/mattermost.spec.js
  11. 18
      server/notification-providers/notification-provider.spec.js
  12. 18
      server/notification-providers/octopush.spec.js
  13. 18
      server/notification-providers/promosms.spec.js
  14. 18
      server/notification-providers/pushbullet.spec.js
  15. 18
      server/notification-providers/pushover.spec.js
  16. 18
      server/notification-providers/pushy.spec.js
  17. 18
      server/notification-providers/rocket-chat.spec.js
  18. 18
      server/notification-providers/signal.spec.js
  19. 18
      server/notification-providers/slack.spec.js
  20. 18
      server/notification-providers/teams.spec.js
  21. 18
      server/notification-providers/telegram.spec.js
  22. 18
      server/notification-providers/webhook.spec.js

18
server/notification-providers/aliyun-sms.spec.js

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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…
Cancel
Save