From 23b50f82683cefd539ccaa9d1920136aa048f69c Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sun, 1 Nov 2026 00:47:30 +0100 Subject: [PATCH] test: read the wrapped mkdir in the Dockerfile as one command --- lib/__tests__/docker-data-volumes.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/__tests__/docker-data-volumes.test.ts b/lib/__tests__/docker-data-volumes.test.ts index 354af4903..1c0eb4f97 100644 --- a/lib/__tests__/docker-data-volumes.test.ts +++ b/lib/__tests__/docker-data-volumes.test.ts @@ -59,7 +59,8 @@ describe('docker data volumes', () => { }); it('creates every default state folder in the image', () => { - const dockerfile = readFileSync(path.join(ROOT, 'Dockerfile'), 'utf8'); + // Join backslash-continued lines so a wrapped mkdir is read whole. + const dockerfile = readFileSync(path.join(ROOT, 'Dockerfile'), 'utf8').replace(/\\\r?\n\s*/g, ' '); const created = dockerfile.match(/RUN mkdir -p ([^&\n]+)/)?.[1].trim().split(/\s+/) ?? []; for (const dir of defaultStateDirs()) expect(created).toContain(dir); });