Skip to content

Commit 2a4d072

Browse files
committed
chore: fix conformance testS
1 parent 3e25ac3 commit 2a4d072

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/cli/src/__tests__/conformance/scenarios.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,14 +1247,17 @@ export const SUCCESS_SCENARIOS = {
12471247
if (separate.result.code !== 0) {
12481248
throw new Error('Failed to prepare continue-previous conformance fixture via lists separate.');
12491249
}
1250+
// Resolve target from the prepared document to avoid stale nodeId usage
1251+
// when list-item ids are regenerated across write/reload boundaries.
1252+
const preparedSecondItem = await nthListAddress(harness, stateDir, preparedDoc, 1);
12501253
return {
12511254
stateDir,
12521255
args: [
12531256
'lists',
12541257
'continue-previous',
12551258
preparedDoc,
12561259
'--target-json',
1257-
JSON.stringify(secondItem),
1260+
JSON.stringify(preparedSecondItem),
12581261
'--out',
12591262
harness.createOutputPath('doc-lists-continue-previous-output'),
12601263
],
@@ -1334,14 +1337,17 @@ export const SUCCESS_SCENARIOS = {
13341337
if (separate.result.code !== 0) {
13351338
throw new Error('Failed to prepare join conformance fixture via lists separate.');
13361339
}
1340+
// Resolve target from the prepared document to avoid stale nodeId usage
1341+
// when list-item ids are regenerated across write/reload boundaries.
1342+
const preparedSecondItem = await nthListAddress(harness, stateDir, preparedDoc, 1);
13371343
return {
13381344
stateDir,
13391345
args: [
13401346
'lists',
13411347
'join',
13421348
preparedDoc,
13431349
'--input-json',
1344-
JSON.stringify({ target: secondItem, direction: 'withPrevious' }),
1350+
JSON.stringify({ target: preparedSecondItem, direction: 'withPrevious' }),
13451351
'--out',
13461352
harness.createOutputPath('doc-lists-join-output'),
13471353
],

0 commit comments

Comments
 (0)