Uptime calculation improvement and 1-year uptime (#2750)

This commit is contained in:
Louis Lam 2023-09-01 05:19:21 +08:00 committed by GitHub
parent eec221247f
commit 076331bf00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 1306 additions and 264 deletions

View file

@ -847,29 +847,6 @@ exports.doubleCheckPassword = async (socket, currentPassword) => {
return user;
};
/**
* Start Unit tests
* @returns {void}
*/
exports.startUnitTest = async () => {
console.log("Starting unit test...");
const npm = /^win/.test(process.platform) ? "npm.cmd" : "npm";
const child = childProcess.spawn(npm, [ "run", "jest-backend" ]);
child.stdout.on("data", (data) => {
console.log(data.toString());
});
child.stderr.on("data", (data) => {
console.log(data.toString());
});
child.on("close", function (code) {
console.log("Jest exit code: " + code);
process.exit(code);
});
};
/**
* Start end-to-end tests
* @returns {void}