Skip to content

Commit fa9d272

Browse files
committed
test(review): preserve unknown surface counts after integration
1 parent 87cbdc6 commit fa9d272

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎test/pr-surface-stats.test.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ test("surface counts use only the current rename path while proof retains both s
3939
pullFiles: [{ filename, previous_filename, status: "renamed", additions: 57, deletions: 0 }],
4040
};
4141
const files = prSurfaceFilesFromContext(context);
42+
assert.ok(files);
4243
assert.deepEqual(files, [{ path: filename, additions: 57, deletions: 0 }]);
43-
const populated = buildOpenClawPrSurfaceStats(files).filter((row) => row.files > 0);
44+
const stats = buildOpenClawPrSurfaceStats(files);
45+
assert.ok(stats);
46+
const populated = stats.filter((row) => row.files > 0);
4447
assert.equal(populated.length, 1);
4548
assert.equal(populated[0]?.bucket, bucket);
4649
assert.deepEqual(
@@ -52,7 +55,7 @@ test("surface counts use only the current rename path while proof retains both s
5255
...context,
5356
counts: { comments: 0, timeline: 0, pullFilesTruncated: true },
5457
}),
55-
[],
58+
null,
5659
);
5760
}
5861
});
@@ -63,6 +66,7 @@ test("OpenClaw support fixtures count as tests, including the +57 ownership repr
6366
const stats = buildOpenClawPrSurfaceStats([
6467
{ path: pinnedTestRolePaths[0], additions: 57, deletions: 0 },
6568
]);
69+
assert.ok(stats);
6670
assert.equal(renderOpenClawPrSurfaceSummary(stats), "Tests +57. Total +57 across 1 file.");
6771
const table = renderOpenClawPrSurfaceTable(stats);
6872
assert.match(table, /\| Source \| 0 \| 0 \| 0 \| 0 \|/);

0 commit comments

Comments
 (0)