From 76e46d295c18745ccef2432b5899aa6546af137a Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Sun, 13 Sep 2026 18:02:00 +0200 Subject: [PATCH] fix(test): register Docker import check with Vitest --- scripts/docker-start.import.test.mjs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/docker-start.import.test.mjs b/scripts/docker-start.import.test.mjs index 78412630..b242bf8d 100644 --- a/scripts/docker-start.import.test.mjs +++ b/scripts/docker-start.import.test.mjs @@ -1,13 +1,17 @@ import assert from "node:assert/strict"; import { spawnSync } from "node:child_process"; -const result = spawnSync( - process.execPath, - [ - "--input-type=module", - "-e", - "import {validateRuntime} from './scripts/docker-start.mjs';try{validateRuntime({});process.exit(1)}catch(error){if(!error.message.startsWith('Invalid runtime configuration'))throw error}", - ], - { encoding: "utf8" }, -); -assert.equal(result.status, 0, result.stderr); +import { it } from "vitest"; + +it("imports runtime validation without starting the CMS", () => { + const result = spawnSync( + process.execPath, + [ + "--input-type=module", + "-e", + "import {validateRuntime} from './scripts/docker-start.mjs';try{validateRuntime({});process.exit(1)}catch(error){if(!error.message.startsWith('Invalid runtime configuration'))throw error}", + ], + { encoding: "utf8" }, + ); + assert.equal(result.status, 0, result.stderr); +});