From 50dc6f25b3d5e44e10ed137c50c0b35f99fa247e Mon Sep 17 00:00:00 2001 From: undefined Date: Tue, 10 Jan 2023 05:26:41 +0800 Subject: [PATCH] workspace: fix engine version check --- test/entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/entry.js b/test/entry.js index c0f08b19..475282d4 100644 --- a/test/entry.js +++ b/test/entry.js @@ -1,6 +1,6 @@ process.env.CI = true; -const version = process.versions.node.split('.'); +const version = process.versions.node.split('.').map((i) => i.padStart(2, '0')); version.pop(); -if (+version.join('.') < 18.8) throw new Error('Tests only available in NodeJS>=18.8'); +if (+version.join('.') < 18.08) throw new Error('Tests only available in NodeJS>=18.8'); require('hydrooj/bin/hydrooj'); require('./main');