1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2025-11-25 22:41:57 +02:00
Files
uptime-kuma/test/test-backend.mjs
2025-10-27 23:58:27 +08:00

13 lines
451 B
JavaScript

import * as childProcess from "child_process";
const version = parseInt(process.version.slice(1).split(".")[0]);
/**
* Since Node.js 22 introduced a different "node --test" command with glob, we need to run different test commands based on the Node.js version.
*/
if (version < 22) {
childProcess.execSync("npm run test-backend-20", { stdio: "inherit" });
} else {
childProcess.execSync("npm run test-backend-22", { stdio: "inherit" });
}