Migrate tests to ESM

This commit is contained in:
Alex Holliday committed 2024-10-15 14:00:24 +08:00
1 parent f057807b56
commit 896b3437e5
22 files changed
+1153 -238

No files matched your search

+2 -2
View File
@@ -14,7 +14,7 @@ import jwt from "jsonwebtoken";
import { getTokenFromHeaders } from "../utils/utils.js";
import crypto from "crypto";
import { handleValidationError, handleError } from "./controllerUtils.js";
const SERVICE_NAME = "authController";
dotenv.config();
/**
@@ -430,7 +430,7 @@ const deleteUser = async (req, res, next) => {
}
};
const getAllUsers = async (req, res) => {
const getAllUsers = async (req, res, next) => {
try {
const allUsers = await req.db.getAllUsers(req, res);
res
+1 -1
View File
@@ -144,7 +144,7 @@ const updateChecksTTL = async (req, res, next) => {
}
};
export default {
export {
createCheck,
getChecks,
getTeamChecks,
@@ -161,7 +161,7 @@ const editMaintenanceWindow = async (req, res, next) => {
}
};
export default {
export {
createMaintenanceWindows,
getMaintenanceWindowById,
getMaintenanceWindowsByTeamId,
+1 -1
View File
@@ -477,7 +477,7 @@ const addDemoMonitors = async (req, res, next) => {
}
};
export default {
export {
getAllMonitors,
getMonitorStatsById,
getMonitorCertificate,
+1 -6
View File
@@ -56,9 +56,4 @@ const obliterateQueue = async (req, res, next) => {
}
};
export default {
getMetrics,
getJobs,
addJob,
obliterateQueue,
};
export { getMetrics, getJobs, addJob, obliterateQueue };
+1 -4
View File
@@ -39,7 +39,4 @@ const updateAppSettings = async (req, res, next) => {
}
};
export default {
getAppSettings,
updateAppSettings,
};
export { getAppSettings, updateAppSettings };