diff --git a/package-lock.json b/package-lock.json index 2b1ba4ab4..ebbde7f6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,13 +57,13 @@ "xml2js": "^0.6.2" }, "devDependencies": { - "@cloudron/bail-reporter": "^1.1.0", "@eslint/js": "^10.0.1", "commander": "^14.0.3", "easy-table": "^1.2.0", "eslint": "^10.0.0", "eventsource": "^4.1.0", "globals": "^17.3.0", + "mocha": "^11.7.5", "nock": "^14.0.11", "ssh2": "^1.17.0" } @@ -1158,13 +1158,6 @@ "specificity": "bin/cli.js" } }, - "node_modules/@cloudron/bail-reporter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@cloudron/bail-reporter/-/bail-reporter-1.1.0.tgz", - "integrity": "sha512-PK2VVEP/SJMfMGRgXijAWiV1fg4oV/QdaTu+Wox+ltxJyx2Vkp20dCKaphwpww8JvG1dcvIHxQ8pZbC0VVdUgQ==", - "dev": true, - "license": "ISC" - }, "node_modules/@cloudron/connect-lastmile": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@cloudron/connect-lastmile/-/connect-lastmile-3.0.0.tgz", @@ -1939,6 +1932,109 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@js-sdsl/ordered-map": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", @@ -2276,6 +2372,17 @@ "node": ">=20.0.0" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -3288,6 +3395,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/arrify": { "version": "2.0.1", "license": "MIT", @@ -3510,6 +3624,13 @@ "concat-map": "0.0.1" } }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -3594,6 +3715,52 @@ "node": ">=6" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -4189,6 +4356,16 @@ ], "license": "MIT" }, + "node_modules/diff": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dijkstrajs": { "version": "1.0.1", "license": "MIT" @@ -4289,6 +4466,13 @@ "stream-shift": "^1.0.2" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/easy-table": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.2.0.tgz", @@ -5078,6 +5262,16 @@ "node": ">=8" } }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -5099,6 +5293,23 @@ "dev": true, "license": "ISC" }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -5472,6 +5683,16 @@ "node": ">=14.0.0" } }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -5496,6 +5717,16 @@ "node": ">= 0.4" } }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, "node_modules/html-encoding-sniffer": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz", @@ -5699,6 +5930,26 @@ "dev": true, "license": "MIT" }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -5748,6 +5999,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5759,6 +6023,22 @@ "version": "0.1.2", "license": "MIT" }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jake": { "version": "10.9.4", "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", @@ -5785,6 +6065,19 @@ "url": "https://github.com/sponsors/panva" } }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsdom": { "version": "28.1.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-28.1.0.tgz", @@ -6245,6 +6538,23 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/long": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", @@ -6364,6 +6674,16 @@ "version": "1.2.5", "license": "MIT" }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "0.5.5", "license": "MIT", @@ -6380,6 +6700,169 @@ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "license": "MIT" }, + "node_modules/mocha": { + "version": "11.7.5", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.5.tgz", + "integrity": "sha512-mTT6RgopEYABzXWFx+GcJ+ZQ32kp4fMf0xvpZIIfSq9Z8lC/++MtcCnQ9t5FP2veYEP95FIYSvW+U9fV4xrlig==", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-stdout": "^1.3.1", + "chokidar": "^4.0.1", + "debug": "^4.3.5", + "diff": "^7.0.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^10.4.5", + "he": "^1.2.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^9.0.5", + "ms": "^2.1.3", + "picocolors": "^1.1.1", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^9.2.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/moment": { "version": "2.30.1", "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", @@ -6771,6 +7254,13 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parse-database-url": { "version": "0.3.0", "license": "MIT", @@ -6828,6 +7318,30 @@ "version": "1.0.6", "license": "MIT" }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/path-to-regexp": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", @@ -7092,6 +7606,16 @@ "node": ">= 0.8" } }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -7191,6 +7715,20 @@ "node": ">= 6" } }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/reflect-metadata": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", @@ -7425,6 +7963,16 @@ "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/serve-static": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", @@ -7552,6 +8100,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -7716,6 +8277,22 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "license": "MIT", @@ -7726,6 +8303,20 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "2.0.1", "license": "MIT", @@ -7750,6 +8341,22 @@ "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==" }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "license": "MIT" @@ -8317,6 +8924,13 @@ "node": ">=0.10.0" } }, + "node_modules/workerpool": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", + "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/wrap-ansi": { "version": "7.0.0", "license": "MIT", @@ -8332,6 +8946,25 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "license": "ISC" @@ -8423,6 +9056,48 @@ "node": ">=12" } }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yargs/node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", diff --git a/package.json b/package.json index 326295e53..715193f72 100644 --- a/package.json +++ b/package.json @@ -62,13 +62,13 @@ "xml2js": "^0.6.2" }, "devDependencies": { - "@cloudron/bail-reporter": "^1.1.0", "@eslint/js": "^10.0.1", "commander": "^14.0.3", "easy-table": "^1.2.0", "eslint": "^10.0.0", "eventsource": "^4.1.0", "globals": "^17.3.0", + "mocha": "^11.7.5", "nock": "^14.0.11", "ssh2": "^1.17.0" }, diff --git a/run-tests b/run-tests index 39e30c836..0343b5d92 100755 --- a/run-tests +++ b/run-tests @@ -8,7 +8,7 @@ readonly DEFAULT_TESTS="./src/test/*-test.js ./src/routes/test/*-test.js" # fast path: if explicit tests are provided, run them directly and skip setup. if [[ $# -gt 0 ]]; then - BOX_ENV=test node --test --test-concurrency=1 --test-reporter spec --test-reporter-destination stdout --test-reporter @cloudron/bail-reporter --test-reporter-destination stderr "$@" + BOX_ENV=test ./node_modules/.bin/mocha --bail --no-timeouts --exit -R spec "$@" exit $? fi @@ -91,5 +91,5 @@ BOX_ENV=test DATABASE_URL=mysql://root:password@${MYSQL_IP}/box node_modules/.bi TESTS=${DEFAULT_TESTS} -echo "=> Run tests with node:test" -BOX_ENV=test node --test --test-concurrency=1 --test-reporter spec --test-reporter-destination stdout --test-reporter @cloudron/bail-reporter --test-reporter-destination stderr ${TESTS} +echo "=> Run tests with mocha" +BOX_ENV=test ./node_modules/.bin/mocha --bail --no-timeouts --exit -R spec ${TESTS} diff --git a/src/routes/test/api-test.js b/src/routes/test/api-test.js index 48ee67a4d..ba556477a 100644 --- a/src/routes/test/api-test.js +++ b/src/routes/test/api-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/applinks-test.js b/src/routes/test/applinks-test.js index 896a4bccf..4eccb636b 100644 --- a/src/routes/test/applinks-test.js +++ b/src/routes/test/applinks-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import applinks from '../../applinks.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/routes/test/apppasswords-test.js b/src/routes/test/apppasswords-test.js index 54271bf3b..fcf50bae8 100644 --- a/src/routes/test/apppasswords-test.js +++ b/src/routes/test/apppasswords-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/appstore-test.js b/src/routes/test/appstore-test.js index ea07852a4..b17fac08f 100644 --- a/src/routes/test/appstore-test.js +++ b/src/routes/test/appstore-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import appstore from '../../appstore.js'; import common from './common.js'; import constants from '../../constants.js'; diff --git a/src/routes/test/archives-test.js b/src/routes/test/archives-test.js index cbbb6b47c..3d0d9b239 100644 --- a/src/routes/test/archives-test.js +++ b/src/routes/test/archives-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import archives from '../../archives.js'; import backups from '../../backups.js'; import common from './common.js'; diff --git a/src/routes/test/backups-test.js b/src/routes/test/backups-test.js index 9312f2ad1..8ec0d7e13 100644 --- a/src/routes/test/backups-test.js +++ b/src/routes/test/backups-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/backupsites-test.js b/src/routes/test/backupsites-test.js index 696b0ad3b..d428e87be 100644 --- a/src/routes/test/backupsites-test.js +++ b/src/routes/test/backupsites-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import backupSites from '../../backupsites.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/routes/test/branding-test.js b/src/routes/test/branding-test.js index 65db3c5c7..b48ff6fcb 100644 --- a/src/routes/test/branding-test.js +++ b/src/routes/test/branding-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import constants from '../../constants.js'; import assert from 'node:assert/strict'; diff --git a/src/routes/test/cloudron-test.js b/src/routes/test/cloudron-test.js index f5ee5af0c..aafc9de75 100644 --- a/src/routes/test/cloudron-test.js +++ b/src/routes/test/cloudron-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import constants from '../../constants.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/routes/test/directoryserver-test.js b/src/routes/test/directoryserver-test.js index a4c842889..8ea9d278b 100644 --- a/src/routes/test/directoryserver-test.js +++ b/src/routes/test/directoryserver-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/dockerregistries-test.js b/src/routes/test/dockerregistries-test.js index aab1b581b..864922f25 100644 --- a/src/routes/test/dockerregistries-test.js +++ b/src/routes/test/dockerregistries-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/domains-test.js b/src/routes/test/domains-test.js index b99d8a254..8d5746094 100644 --- a/src/routes/test/domains-test.js +++ b/src/routes/test/domains-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import child_process from 'node:child_process'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/routes/test/eventlog-test.js b/src/routes/test/eventlog-test.js index 50fef05a3..776e546e5 100644 --- a/src/routes/test/eventlog-test.js +++ b/src/routes/test/eventlog-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import async from 'async'; import common from './common.js'; import eventlog from '../../eventlog.js'; diff --git a/src/routes/test/externalldap-test.js b/src/routes/test/externalldap-test.js index d25abe9ef..b2f5a9135 100644 --- a/src/routes/test/externalldap-test.js +++ b/src/routes/test/externalldap-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/groups-test.js b/src/routes/test/groups-test.js index 4663dbc03..d127b217f 100644 --- a/src/routes/test/groups-test.js +++ b/src/routes/test/groups-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/mail-test.js b/src/routes/test/mail-test.js index fcee3c12d..713d4e867 100644 --- a/src/routes/test/mail-test.js +++ b/src/routes/test/mail-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import mail from '../../mail.js'; diff --git a/src/routes/test/network-test.js b/src/routes/test/network-test.js index 398b93d74..48e3d50e7 100644 --- a/src/routes/test/network-test.js +++ b/src/routes/test/network-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/notifications-test.js b/src/routes/test/notifications-test.js index bde03a52d..e8eeec474 100644 --- a/src/routes/test/notifications-test.js +++ b/src/routes/test/notifications-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import notifications from '../../notifications.js'; diff --git a/src/routes/test/oidcclients-test.js b/src/routes/test/oidcclients-test.js index 468581664..781820838 100644 --- a/src/routes/test/oidcclients-test.js +++ b/src/routes/test/oidcclients-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/profile-test.js b/src/routes/test/profile-test.js index cd6c79959..01e5005e6 100644 --- a/src/routes/test/profile-test.js +++ b/src/routes/test/profile-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import fs from 'node:fs'; diff --git a/src/routes/test/provision-test.js b/src/routes/test/provision-test.js index 905754ff7..3a4dc0b83 100644 --- a/src/routes/test/provision-test.js +++ b/src/routes/test/provision-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import appstore from '../../appstore.js'; import assert from 'node:assert/strict'; diff --git a/src/routes/test/system-test.js b/src/routes/test/system-test.js index fa1b6ca4f..c6141c600 100644 --- a/src/routes/test/system-test.js +++ b/src/routes/test/system-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import constants from '../../constants.js'; import common from './common.js'; import { EventSource } from 'eventsource'; diff --git a/src/routes/test/tasks-test.js b/src/routes/test/tasks-test.js index 93d37bbf0..fd07fcd6c 100644 --- a/src/routes/test/tasks-test.js +++ b/src/routes/test/tasks-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import safe from 'safetydance'; diff --git a/src/routes/test/tokens-test.js b/src/routes/test/tokens-test.js index 01732d12a..04663da97 100644 --- a/src/routes/test/tokens-test.js +++ b/src/routes/test/tokens-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/updater-test.js b/src/routes/test/updater-test.js index 26a417cf0..f257ff3cf 100644 --- a/src/routes/test/updater-test.js +++ b/src/routes/test/updater-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import constants from '../../constants.js'; import assert from 'node:assert/strict'; diff --git a/src/routes/test/user-directory-test.js b/src/routes/test/user-directory-test.js index 101ed086d..43c0af1ae 100644 --- a/src/routes/test/user-directory-test.js +++ b/src/routes/test/user-directory-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import superagent from '@cloudron/superagent'; diff --git a/src/routes/test/users-test.js b/src/routes/test/users-test.js index df40a06e3..98af2d2b1 100644 --- a/src/routes/test/users-test.js +++ b/src/routes/test/users-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import fs from 'node:fs'; diff --git a/src/routes/test/volumes-test.js b/src/routes/test/volumes-test.js index 150bd641b..239d339c9 100644 --- a/src/routes/test/volumes-test.js +++ b/src/routes/test/volumes-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import safe from 'safetydance'; diff --git a/src/test/acme2-test.js b/src/test/acme2-test.js index d4139a06b..7f8de0249 100644 --- a/src/test/acme2-test.js +++ b/src/test/acme2-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import acme2 from '../acme2.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/addonconfigs-test.js b/src/test/addonconfigs-test.js index c2451b377..e70113cf0 100644 --- a/src/test/addonconfigs-test.js +++ b/src/test/addonconfigs-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import addonConfigs from '../addonconfigs.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/applinks-test.js b/src/test/applinks-test.js index 84f0f8a82..c882f4e32 100644 --- a/src/test/applinks-test.js +++ b/src/test/applinks-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import applinks from '../applinks.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/apppasswords-test.js b/src/test/apppasswords-test.js index 96eafd33e..9bfa5411a 100644 --- a/src/test/apppasswords-test.js +++ b/src/test/apppasswords-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import appPasswords from '../apppasswords.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/apps-test.js b/src/test/apps-test.js index 5ff17a107..031f88407 100644 --- a/src/test/apps-test.js +++ b/src/test/apps-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import apps from '../apps.js'; import AuditSource from '../auditsource.js'; import BoxError from '../boxerror.js'; diff --git a/src/test/apptask-test.js b/src/test/apptask-test.js index 57242dd20..45ac9e8bb 100644 --- a/src/test/apptask-test.js +++ b/src/test/apptask-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import apptask from '../apptask.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/archives-test.js b/src/test/archives-test.js index d77a0e551..b12498247 100644 --- a/src/test/archives-test.js +++ b/src/test/archives-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import archives from '../archives.js'; import backups from '../backups.js'; import BoxError from '../boxerror.js'; diff --git a/src/test/backupcleaner-test.js b/src/test/backupcleaner-test.js index 70c377e88..66145c9bf 100644 --- a/src/test/backupcleaner-test.js +++ b/src/test/backupcleaner-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import archives from '../archives.js'; import backupCleaner from '../backupcleaner.js'; import backups from '../backups.js'; diff --git a/src/test/backupformat-test.js b/src/test/backupformat-test.js index fa74e7bfa..425ec735e 100644 --- a/src/test/backupformat-test.js +++ b/src/test/backupformat-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import DataLayout from '../datalayout.js'; import tgz from '../backupformat/tgz.js'; diff --git a/src/test/backupintegrity-test.js b/src/test/backupintegrity-test.js index ef4b79139..11ed414e1 100644 --- a/src/test/backupintegrity-test.js +++ b/src/test/backupintegrity-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import backupIntegrity from '../backupintegrity.js'; import backups from '../backups.js'; import backupSites from '../backupsites.js'; diff --git a/src/test/backups-test.js b/src/test/backups-test.js index 9d0b3d37f..2673355fe 100644 --- a/src/test/backups-test.js +++ b/src/test/backups-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import backups from '../backups.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/backupsites-test.js b/src/test/backupsites-test.js index 24e788413..c549f1fd5 100644 --- a/src/test/backupsites-test.js +++ b/src/test/backupsites-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import archives from '../archives.js'; import backups from '../backups.js'; import backupSites from '../backupsites.js'; diff --git a/src/test/backuptask-test.js b/src/test/backuptask-test.js index 9bb9104e0..85cb01578 100644 --- a/src/test/backuptask-test.js +++ b/src/test/backuptask-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import backups from '../backups.js'; import backupSites from '../backupsites.js'; import child_process from 'node:child_process'; diff --git a/src/test/blobs-test.js b/src/test/blobs-test.js index 6620dd565..1972dbd33 100644 --- a/src/test/blobs-test.js +++ b/src/test/blobs-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import blobs from '../blobs.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/branding-test.js b/src/test/branding-test.js index f47af0662..a1f63e185 100644 --- a/src/test/branding-test.js +++ b/src/test/branding-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import branding from '../branding.js'; import common from './common.js'; diff --git a/src/test/cloudron-test.js b/src/test/cloudron-test.js index 28beb9034..35a326304 100644 --- a/src/test/cloudron-test.js +++ b/src/test/cloudron-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import cloudron from '../cloudron.js'; diff --git a/src/test/database-test.js b/src/test/database-test.js index e54e15a81..7d321a64c 100644 --- a/src/test/database-test.js +++ b/src/test/database-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import database from '../database.js'; import assert from 'node:assert/strict'; diff --git a/src/test/datalayout-test.js b/src/test/datalayout-test.js index bc92fd5a3..de66c80b9 100644 --- a/src/test/datalayout-test.js +++ b/src/test/datalayout-test.js @@ -1,5 +1,4 @@ -import { describe, it } from 'node:test'; - +import { describe, it } from 'mocha'; import DataLayout from '../datalayout.js'; import assert from 'node:assert/strict'; diff --git a/src/test/df-test.js b/src/test/df-test.js index 3e96e2143..d0b457269 100644 --- a/src/test/df-test.js +++ b/src/test/df-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import child_process from 'node:child_process'; import common from './common.js'; import df from '../df.js'; diff --git a/src/test/directoryserver-test.js b/src/test/directoryserver-test.js index 06afaa4e7..46b0700d7 100644 --- a/src/test/directoryserver-test.js +++ b/src/test/directoryserver-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import async from 'async'; import common from './common.js'; import constants from '../constants.js'; diff --git a/src/test/dns-providers-test.js b/src/test/dns-providers-test.js index 6dafb5279..417a2a9ab 100644 --- a/src/test/dns-providers-test.js +++ b/src/test/dns-providers-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after, beforeEach } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after, beforeEach } from 'mocha'; import common from './common.js'; import dns from '../dns.js'; import domains from '../domains.js'; diff --git a/src/test/dns-test.js b/src/test/dns-test.js index 838be6ffb..5f8f9cdb9 100644 --- a/src/test/dns-test.js +++ b/src/test/dns-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import dns from '../dns.js'; import assert from 'node:assert/strict'; diff --git a/src/test/docker-test.js b/src/test/docker-test.js index 754ccaef0..b3c6921cc 100644 --- a/src/test/docker-test.js +++ b/src/test/docker-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import docker from '../docker.js'; import assert from 'node:assert/strict'; diff --git a/src/test/dockerproxy-test.js b/src/test/dockerproxy-test.js index c96aac473..4dd936c56 100644 --- a/src/test/dockerproxy-test.js +++ b/src/test/dockerproxy-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import child_process from 'node:child_process'; import common from './common.js'; import constants from '../constants.js'; diff --git a/src/test/dockerregistries-test.js b/src/test/dockerregistries-test.js index c562517b8..13d7b3443 100644 --- a/src/test/dockerregistries-test.js +++ b/src/test/dockerregistries-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import dockerRegistries from '../dockerregistries.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/domains-test.js b/src/test/domains-test.js index 1e26f1bc5..b019c7497 100644 --- a/src/test/domains-test.js +++ b/src/test/domains-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import apps from '../apps.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/eventlog-test.js b/src/test/eventlog-test.js index 948afa537..b26c921fe 100644 --- a/src/test/eventlog-test.js +++ b/src/test/eventlog-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import database from '../database.js'; import eventlog from '../eventlog.js'; diff --git a/src/test/externalldap-test.js b/src/test/externalldap-test.js index 0692fe7e8..50ac401e5 100644 --- a/src/test/externalldap-test.js +++ b/src/test/externalldap-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import async from 'async'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/groups-test.js b/src/test/groups-test.js index 4d4f69ed2..ce4895089 100644 --- a/src/test/groups-test.js +++ b/src/test/groups-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/ipaddr-test.js b/src/test/ipaddr-test.js index 3c69e6b34..0932e7f92 100644 --- a/src/test/ipaddr-test.js +++ b/src/test/ipaddr-test.js @@ -1,5 +1,4 @@ -import { describe, it } from 'node:test'; - +import { describe, it } from 'mocha'; import assert from 'node:assert/strict'; import ipaddr from '../ipaddr.js'; diff --git a/src/test/janitor-test.js b/src/test/janitor-test.js index f27f0504d..2db774dd2 100644 --- a/src/test/janitor-test.js +++ b/src/test/janitor-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import janitor from '../janitor.js'; diff --git a/src/test/ldapserver-test.js b/src/test/ldapserver-test.js index 17ba74ce4..09f14e66c 100644 --- a/src/test/ldapserver-test.js +++ b/src/test/ldapserver-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import addonConfigs from '../addonconfigs.js'; import async from 'async'; import common from './common.js'; diff --git a/src/test/locks-test.js b/src/test/locks-test.js index 163c7e9fc..25c38989c 100644 --- a/src/test/locks-test.js +++ b/src/test/locks-test.js @@ -1,12 +1,11 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; import safe from 'safetydance'; import locks from '../locks.js'; -describe('Locks', { timeout: 20000 }, function () { +describe('Locks', function () { const { setup, cleanup } = common; diff --git a/src/test/logs-test.js b/src/test/logs-test.js index b573feb3a..78385e270 100644 --- a/src/test/logs-test.js +++ b/src/test/logs-test.js @@ -1,5 +1,4 @@ -import { describe, it } from 'node:test'; - +import { describe, it } from 'mocha'; import assert from 'node:assert/strict'; import fs from 'node:fs'; import logs from '../logs.js'; diff --git a/src/test/mail-test.js b/src/test/mail-test.js index be3f18eaa..589f6854c 100644 --- a/src/test/mail-test.js +++ b/src/test/mail-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import BoxError from '../boxerror.js'; import assert from 'node:assert/strict'; diff --git a/src/test/mailpasswords-test.js b/src/test/mailpasswords-test.js index 0f9adcdc4..56b7fb9e4 100644 --- a/src/test/mailpasswords-test.js +++ b/src/test/mailpasswords-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import mailPasswords from '../mailpasswords.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/network-test.js b/src/test/network-test.js index da59316a7..a5f8d4230 100644 --- a/src/test/network-test.js +++ b/src/test/network-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/notifications-test.js b/src/test/notifications-test.js index 8366e87cf..986290d46 100644 --- a/src/test/notifications-test.js +++ b/src/test/notifications-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/oidcclients-test.js b/src/test/oidcclients-test.js index 27febcd82..2960bdeac 100644 --- a/src/test/oidcclients-test.js +++ b/src/test/oidcclients-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/openssl-test.js b/src/test/openssl-test.js index 622b7130d..f2487c97b 100644 --- a/src/test/openssl-test.js +++ b/src/test/openssl-test.js @@ -1,5 +1,4 @@ -import { describe, it } from 'node:test'; - +import { describe, it } from 'mocha'; import BoxError from '../boxerror.js'; import assert from 'node:assert/strict'; import openssl from '../openssl.js'; diff --git a/src/test/passkeys-test.js b/src/test/passkeys-test.js index b4f5ad816..974b4832a 100644 --- a/src/test/passkeys-test.js +++ b/src/test/passkeys-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/progress-stream-test.js b/src/test/progress-stream-test.js index 1896dbc4b..48f490acf 100644 --- a/src/test/progress-stream-test.js +++ b/src/test/progress-stream-test.js @@ -1,5 +1,4 @@ -import { describe, it } from 'node:test'; - +import { describe, it } from 'mocha'; import assert from 'node:assert/strict'; import fs from 'node:fs'; import ProgressStream from '../progress-stream.js'; diff --git a/src/test/promise-retry-test.js b/src/test/promise-retry-test.js index 510ae331d..111ef2c4d 100644 --- a/src/test/promise-retry-test.js +++ b/src/test/promise-retry-test.js @@ -1,6 +1,4 @@ -import { describe, it } from 'node:test'; -/* jslint node:true */ - +import { describe, it } from 'mocha'; import assert from 'node:assert/strict'; import promiseRetry from '../promise-retry.js'; import safe from 'safetydance'; diff --git a/src/test/provision-test.js b/src/test/provision-test.js index e5805a513..7e40d3ed4 100644 --- a/src/test/provision-test.js +++ b/src/test/provision-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import appstore from '../appstore.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/reverseproxy-test.js b/src/test/reverseproxy-test.js index f6507b803..24eaf0901 100644 --- a/src/test/reverseproxy-test.js +++ b/src/test/reverseproxy-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import domains from '../domains.js'; import assert from 'node:assert/strict'; diff --git a/src/test/server-test.js b/src/test/server-test.js index e6018d1fe..0915df7a5 100644 --- a/src/test/server-test.js +++ b/src/test/server-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import constants from '../constants.js'; import assert from 'node:assert/strict'; import safe from 'safetydance'; diff --git a/src/test/shell-test.js b/src/test/shell-test.js index 6a24f0adb..b1ae53077 100644 --- a/src/test/shell-test.js +++ b/src/test/shell-test.js @@ -1,6 +1,4 @@ -import { describe, it } from 'node:test'; -/* jslint node:true */ - +import { describe, it } from 'mocha'; import BoxError from '../boxerror.js'; import assert from 'node:assert/strict'; import path from 'node:path'; diff --git a/src/test/storage-provider-test.js b/src/test/storage-provider-test.js index baa16616b..949c73069 100644 --- a/src/test/storage-provider-test.js +++ b/src/test/storage-provider-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import backupSites from '../backupsites.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/superagent-test.js b/src/test/superagent-test.js index 804af73cd..426dc802e 100644 --- a/src/test/superagent-test.js +++ b/src/test/superagent-test.js @@ -1,5 +1,4 @@ -import { describe, it } from 'node:test'; - +import { describe, it } from 'mocha'; import assert from 'node:assert/strict'; import safe from 'safetydance'; import superagent from '@cloudron/superagent'; diff --git a/src/test/syncer-test.js b/src/test/syncer-test.js index b1a7e35e4..830dde463 100644 --- a/src/test/syncer-test.js +++ b/src/test/syncer-test.js @@ -1,5 +1,4 @@ -import { describe, it, before } from 'node:test'; - +import { describe, it, before } from 'mocha'; import common from './common.js'; const { createTree } = common; import DataLayout from '../datalayout.js'; diff --git a/src/test/syslog-test.js b/src/test/syslog-test.js index eed93b461..db2528c8b 100644 --- a/src/test/syslog-test.js +++ b/src/test/syslog-test.js @@ -1,5 +1,4 @@ -#!/usr/bin/env node -import { describe, it, after } from 'node:test'; +import { describe, it, after } from 'mocha'; import assert from 'node:assert/strict'; import fs from 'node:fs'; @@ -32,7 +31,7 @@ async function verifyMessage(pattern, fileName) { if (found === null) throw new Error(`${pattern} not found in ${fileName}`); } -describe('Syslog', { timeout: 5000 }, function () { +describe('Syslog', function () { after(async function () { await syslogServer.stop(); diff --git a/src/test/system-test.js b/src/test/system-test.js index 4071eb52d..fb3f39c25 100644 --- a/src/test/system-test.js +++ b/src/test/system-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import child_process from 'node:child_process'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/tasks-test.js b/src/test/tasks-test.js index 1842c2f75..648cc5552 100644 --- a/src/test/tasks-test.js +++ b/src/test/tasks-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/tokens-test.js b/src/test/tokens-test.js index 647b7be11..30fb528bd 100644 --- a/src/test/tokens-test.js +++ b/src/test/tokens-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/translations-test.js b/src/test/translations-test.js index e7bb25a79..b7e1b2692 100644 --- a/src/test/translations-test.js +++ b/src/test/translations-test.js @@ -1,6 +1,4 @@ -import { describe, it } from 'node:test'; -/* jslint node:true */ - +import { describe, it } from 'mocha'; import assert from 'node:assert/strict'; import translations from '../translations.js'; diff --git a/src/test/underscore-test.js b/src/test/underscore-test.js index d1a6e03b8..4cd48a475 100644 --- a/src/test/underscore-test.js +++ b/src/test/underscore-test.js @@ -1,5 +1,4 @@ -import { describe, it } from 'node:test'; - +import { describe, it } from 'mocha'; import assert from 'node:assert/strict'; import _ from '../underscore.js'; diff --git a/src/test/updater-test.js b/src/test/updater-test.js index c5129ad3d..3b17a8334 100644 --- a/src/test/updater-test.js +++ b/src/test/updater-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import apps from '../apps.js'; import BoxError from '../boxerror.js'; import common from './common.js'; diff --git a/src/test/user-directory-test.js b/src/test/user-directory-test.js index 96caeb84a..11cb01e83 100644 --- a/src/test/user-directory-test.js +++ b/src/test/user-directory-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import common from './common.js'; import assert from 'node:assert/strict'; import oidcClients from '../oidcclients.js'; diff --git a/src/test/users-test.js b/src/test/users-test.js index b7bd7ceb3..cde1ed0dc 100644 --- a/src/test/users-test.js +++ b/src/test/users-test.js @@ -1,5 +1,4 @@ -import { describe, it, before, after } from 'node:test'; - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict'; diff --git a/src/test/validator-test.js b/src/test/validator-test.js index ef6927e10..fb7254d0e 100644 --- a/src/test/validator-test.js +++ b/src/test/validator-test.js @@ -1,5 +1,4 @@ -import { describe, it } from 'node:test'; - +import { describe, it } from 'mocha'; import assert from 'node:assert/strict'; import validator from '../validator.js'; diff --git a/src/test/volumes-test.js b/src/test/volumes-test.js index c1b528471..40706820e 100644 --- a/src/test/volumes-test.js +++ b/src/test/volumes-test.js @@ -1,6 +1,4 @@ -import { describe, it, before, after } from 'node:test'; -/* jslint node:true */ - +import { describe, it, before, after } from 'mocha'; import BoxError from '../boxerror.js'; import common from './common.js'; import assert from 'node:assert/strict';