mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-04 20:24:04 +00:00
22 lines
423 B
JavaScript
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,
|
|
};
|