Handle imports exports format check resolution tests code

This commit is contained in:
om-3004 committed 2024-10-17 10:47:34 +05:30
1 parent c598278c6f
commit afe7c9047c
3 files changed
+6 -3

No files matched your search

+1
View File
@@ -514,6 +514,7 @@ export {
getMonitorsAndSummaryByTeamId, getMonitorsAndSummaryByTeamId,
getMonitorsByTeamId, getMonitorsByTeamId,
createMonitor, createMonitor,
checkEndpointResolution,
deleteMonitor, deleteMonitor,
deleteAllMonitors, deleteAllMonitors,
editMonitor, editMonitor,
+3 -2
View File
@@ -7,6 +7,7 @@ import {
getMonitorsAndSummaryByTeamId, getMonitorsAndSummaryByTeamId,
getMonitorsByTeamId, getMonitorsByTeamId,
createMonitor, createMonitor,
checkEndpointResolution,
deleteMonitor, deleteMonitor,
deleteAllMonitors, deleteAllMonitors,
editMonitor, editMonitor,
@@ -30,13 +31,13 @@ router.get("/team/:teamId", getMonitorsByTeamId);
router.get( router.get(
"/resolution/url", "/resolution/url",
isAllowed(["admin", "superadmin"]), isAllowed(["admin", "superadmin"]),
monitorController.checkEndpointResolution checkEndpointResolution
) )
router.delete( router.delete(
"/:monitorId", "/:monitorId",
isAllowed(["admin", "superadmin"]), isAllowed(["admin", "superadmin"]),
monitorController.deleteMonitor deleteMonitor
); );
router.post("/", isAllowed(["admin", "superadmin"]), createMonitor); router.post("/", isAllowed(["admin", "superadmin"]), createMonitor);
@@ -6,6 +6,7 @@ import {
getMonitorsAndSummaryByTeamId, getMonitorsAndSummaryByTeamId,
getMonitorsByTeamId, getMonitorsByTeamId,
createMonitor, createMonitor,
checkEndpointResolution,
deleteMonitor, deleteMonitor,
deleteAllMonitors, deleteAllMonitors,
editMonitor, editMonitor,
@@ -461,7 +462,7 @@ describe("Monitor Controller - createMonitor", () => {
}); });
describe('checkEndpointResolution', () => { describe('checkEndpointResolution', () => {
let dnsResolveStub; let req, res, next, dnsResolveStub;
beforeEach(() => { beforeEach(() => {
req = { query: { monitorURL: 'https://example.com' } }; req = { query: { monitorURL: 'https://example.com' } };
res = { status: sinon.stub().returnsThis(), json: sinon.stub() }; res = { status: sinon.stub().returnsThis(), json: sinon.stub() };