Skip to content

Commit f2b4cd5

Browse files
committed
test(release): the annotate batteries read the annotated files from disk
Claude-Session: https://claude.ai/code/session_016PVjjuVPte5XEJvaQx1E4t Co-authored-by: Claude <noreply@anthropic.com>
1 parent acb5919 commit f2b4cd5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎scripts/release-pending-publish.mjs‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,8 +1614,9 @@ async function selfTest() {
16141614
writeFileSync(join(q.dir, '.changeset/late-two.md'), handText);
16151615
const third = annotate(q.dir);
16161616
check(
1617-
third.already.join() === '.changeset/late-two.md' && third.annotated.join() === '.changeset/late-one.md,.changeset/late-three.md',
1618-
'the hand-annotated one is "already"; the other two are annotated',
1617+
third.already.join() === '.changeset/late-two.md' && third.annotated.join() === '.changeset/late-one.md,.changeset/late-three.md' &&
1618+
['.changeset/late-one.md', '.changeset/late-three.md'].every((p) => qRead(p).split(LINE).length === 2),
1619+
'the hand-annotated one is "already"; the other two are annotated, once each, on disk',
16191620
);
16201621
check(qRead('.changeset/late-two.md') === handText, 'and the hand-written line is not rewritten or doubled');
16211622

@@ -1657,7 +1658,8 @@ async function selfTest() {
16571658
const deep = shallowClone();
16581659
const deepened = annotate(deep, { rounds: [1, 1, 2, 4] });
16591660
check(
1660-
deepened.verdict === 'done' && deepened.deepenedBy > 0 && deepened.versionCommit === qLanded && deepened.annotated.join() === LATE.join(),
1661+
deepened.verdict === 'done' && deepened.deepenedBy > 0 && deepened.versionCommit === qLanded && deepened.annotated.join() === LATE.join() &&
1662+
LATE.every((p) => readFileSync(join(deep, p), 'utf8').split(LINE).length === 2),
16611663
`a depth-1 clone fetches history in bounded rounds until the version commit and its parent are present, then annotates the same three (deepened by ${deepened.deepenedBy})`,
16621664
);
16631665
const cut = shallowClone();

0 commit comments

Comments
 (0)