Files
metrics/tests/metrics.mjs
2020-11-06 22:21:05 +01:00

28 lines
586 B
JavaScript

//Imports
import build from "../utils/build.mjs"
import colors from "colors"
//Initialization
process.on("unhandledRejection", error => { throw error })
colors
/** Test function */
export default async function test() {
//Perform tests
await test.build()
}
/** Build test */
test.build = async function () {
//Ensure that code has been rebuild
console.log("TEST : build".cyan)
await build({actions:["check"]})
}
//Main
if (/metrics.mjs/.test(process.argv[1])) {
//Test
await test()
console.log("Test success !".green)
}