mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-05 22:29:05 +00:00
fix(ci): parse beta-derived docs CSV lists (#783)
Keep repeated --expect-change flags compatible while accepting the comma-separated workflow input and ignoring whitespace, empty values, and duplicates. Issue: #783 User-Visible: no
This commit is contained in:
@@ -6,7 +6,7 @@ import { readFileSync } from 'node:fs';
|
||||
import { mkdtempSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { acceptIdentical, acceptedDocsManifest, identicalDecision, identicalDocsManifest, verifyDocsCandidate } from '../scripts/docs-accept.mjs';
|
||||
import { acceptIdentical, acceptedDocsManifest, cliList, identicalDecision, identicalDocsManifest, verifyDocsCandidate } from '../scripts/docs-accept.mjs';
|
||||
import { DOC_SCREENSHOT_VERSION, DOC_SCREENSHOTS } from '../demo/docs/screenshots.mjs';
|
||||
|
||||
// Приёмка — единственное место, где картинки попадают в репозиторий, поэтому
|
||||
@@ -19,6 +19,15 @@ const FINGERPRINT = 'f'.repeat(64);
|
||||
const SCRIPT_SHA = 'a'.repeat(64);
|
||||
const bytesOf = (id) => Buffer.from(`картинка ${id}`);
|
||||
|
||||
test('beta-derived: docs expect-change accepts CSV and repeated flags', () => {
|
||||
assert.deepEqual(cliList([
|
||||
'--expect-change=view-desktop, view-touch',
|
||||
'--expect-change=view-desktop',
|
||||
'--expect-change=',
|
||||
'--other=ignored',
|
||||
], 'expect-change'), ['view-desktop', 'view-touch']);
|
||||
});
|
||||
|
||||
const candidate = (overrides = {}) => {
|
||||
const scenarios = {};
|
||||
for (const scenario of DOC_SCREENSHOTS) {
|
||||
|
||||
Reference in New Issue
Block a user