uptime-kuma/test/backend-test/util.js
Louis Lam c3b166bd8f WIP
2023-12-27 19:31:17 +08:00

22 lines
423 B
JavaScript

const semver = require("semver");
let test;
const nodeVersion = process.versions.node;
// Node.js version >= 18
if (semver.satisfies(nodeVersion, ">= 18")) {
test = require("node:test");
} else {
test = require("test");
}
const assert = require("node:assert");
const describe = test.describe;
const it = test.it;
const mock = test.mock;
module.exports = {
test,
assert,
describe,
it,
mock,
};