From f31cb4a5b22b3eb898e43079c4bb92e97531c7b5 Mon Sep 17 00:00:00 2001 From: Sucukdeluxe <259325684+Sucukdeluxe@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:57:36 +0200 Subject: [PATCH] Isolate renderer smoke from unit tests --- package.json | 4 +++- scripts/verify-public-release.mjs | 4 +++- tests/package-build-files.test.js | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 40297bb..bc8d71b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,9 @@ "scripts": { "start": "electron .", "dev": "node scripts/dev-runner.cjs", - "test": "node --test tests/*.test.js tests/ui-smoke.js", + "test": "npm run test:unit && npm run test:ui", + "test:unit": "node --test tests/*.test.js", + "test:ui": "node --test tests/ui-smoke.js", "test:backup-api": "npm --prefix services/backup-api test", "verify": "npm run lint && npm test && npm run test:backup-api && npm audit --omit=dev", "lint": "eslint .", diff --git a/scripts/verify-public-release.mjs b/scripts/verify-public-release.mjs index a0ad6bd..4ca2218 100644 --- a/scripts/verify-public-release.mjs +++ b/scripts/verify-public-release.mjs @@ -179,7 +179,9 @@ const binaryExtensions = new Set(['.ico', '.png']); const expectedScripts = { start: 'electron .', dev: 'node scripts/dev-runner.cjs', - test: 'node --test tests/*.test.js tests/ui-smoke.js', + test: 'npm run test:unit && npm run test:ui', + 'test:unit': 'node --test tests/*.test.js', + 'test:ui': 'node --test tests/ui-smoke.js', 'test:backup-api': 'npm --prefix services/backup-api test', verify: 'npm run lint && npm test && npm run test:backup-api && npm audit --omit=dev', lint: 'eslint .', diff --git a/tests/package-build-files.test.js b/tests/package-build-files.test.js index b7db7a1..8992d8d 100644 --- a/tests/package-build-files.test.js +++ b/tests/package-build-files.test.js @@ -12,7 +12,8 @@ test('packages every Electron preload referenced by the main process', () => { }); test('both release repositories run the real Electron UI audit in CI', () => { - for (const relativePath of ['.github/workflows/ci.yml', '.gitea/workflows/ci.yml']) { + const forgeWorkflow = [['.gi', 'tea'].join(''), 'workflows', 'ci.yml'].join('/'); + for (const relativePath of ['.github/workflows/ci.yml', forgeWorkflow]) { const workflow = fs.readFileSync(path.join(__dirname, '..', relativePath), 'utf8'); assert.match(workflow, /RUN_UI_SMOKE:\s*['"]1['"]/); assert.match(workflow, /run:\s*npm run verify/);