Files
Checkmate/server/tests/utils/messages.test.js
T

23 lines
927 B
JavaScript
Raw Normal View History

2025-04-20 11:29:53 -07:00
import { errorMessages, successMessages } from "../../utils/messages.js";
describe("Messages", function () {
describe("messages - errorMessages", function () {
it("should have a DB_FIND_MONITOR_BY_ID function", function () {
const monitorId = "12345";
2025-07-21 10:34:16 -07:00
expect(errorMessages.DB_FIND_MONITOR_BY_ID(monitorId)).to.equal(`Monitor with id ${monitorId} not found`);
2025-04-20 11:29:53 -07:00
});
it("should have a DB_DELETE_CHECKS function", function () {
const monitorId = "12345";
2025-07-21 10:34:16 -07:00
expect(errorMessages.DB_DELETE_CHECKS(monitorId)).to.equal(`No checks found for monitor with id ${monitorId}`);
2025-04-20 11:29:53 -07:00
});
});
describe("messages - successMessages", function () {
it("should have a MONITOR_GET_BY_USER_ID function", function () {
const userId = "12345";
2025-07-21 10:34:16 -07:00
expect(successMessages.MONITOR_GET_BY_USER_ID(userId)).to.equal(`Got monitor for ${userId} successfully"`);
2025-04-20 11:29:53 -07:00
});
// Add more tests for other success messages as needed
});
});