Files
memind/release-gate/changed-scope.test.mjs
john b1577a16e9
Memind CI / Test, build, and release guards (push) Failing after 12m3s
fix: harden release gate and page delivery
2026-07-26 14:32:01 +08:00

26 lines
784 B
JavaScript

import assert from 'node:assert/strict';
import test from 'node:test';
import { parseGitStatusPorcelainZ } from '../scripts/git-porcelain-paths.mjs';
test('changed-scope parser preserves spaces and unicode without git status prefixes', () => {
const output = [
' M release-gate/report.mjs',
'?? docs/发包必看.md',
'A docs/file with spaces.md',
'',
].join('\0');
assert.deepEqual(parseGitStatusPorcelainZ(output), [
'release-gate/report.mjs',
'docs/发包必看.md',
'docs/file with spaces.md',
]);
});
test('changed-scope parser uses the rename destination and skips the source entry', () => {
assert.deepEqual(
parseGitStatusPorcelainZ('R docs/new.md\0docs/old.md\0 M package.json\0'),
['docs/new.md', 'package.json'],
);
});