Isolate renderer smoke from unit tests
This commit is contained in:
+3
-1
@@ -6,7 +6,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
"dev": "node scripts/dev-runner.cjs",
|
"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",
|
"test:backup-api": "npm --prefix services/backup-api test",
|
||||||
"verify": "npm run lint && npm test && npm run test:backup-api && npm audit --omit=dev",
|
"verify": "npm run lint && npm test && npm run test:backup-api && npm audit --omit=dev",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
|
|||||||
@@ -179,7 +179,9 @@ const binaryExtensions = new Set(['.ico', '.png']);
|
|||||||
const expectedScripts = {
|
const expectedScripts = {
|
||||||
start: 'electron .',
|
start: 'electron .',
|
||||||
dev: 'node scripts/dev-runner.cjs',
|
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',
|
'test:backup-api': 'npm --prefix services/backup-api test',
|
||||||
verify: 'npm run lint && npm test && npm run test:backup-api && npm audit --omit=dev',
|
verify: 'npm run lint && npm test && npm run test:backup-api && npm audit --omit=dev',
|
||||||
lint: 'eslint .',
|
lint: 'eslint .',
|
||||||
|
|||||||
@@ -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', () => {
|
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');
|
const workflow = fs.readFileSync(path.join(__dirname, '..', relativePath), 'utf8');
|
||||||
assert.match(workflow, /RUN_UI_SMOKE:\s*['"]1['"]/);
|
assert.match(workflow, /RUN_UI_SMOKE:\s*['"]1['"]/);
|
||||||
assert.match(workflow, /run:\s*npm run verify/);
|
assert.match(workflow, /run:\s*npm run verify/);
|
||||||
|
|||||||
Reference in New Issue
Block a user