Skip to content

test: derive dependency patch hunk counts dynamically - #574

Merged
yaojin3616 merged 1 commit into
mainfrom
pr/patch-hunk-counts
Sep 26, 2026
Merged

yaojin3616 merged 1 commit into
mainfrom
pr/patch-hunk-counts

Conversation

@yaojin3616

Copy link
Copy Markdown
Contributor

变更

将 patch-hunk-counts 测试中硬编码的 hunk header 字符串替换为动态正则匹配,先定位 @deepseek-ai/dsh patch 中 package.json 部分的第一个 hunk,再对行数做减一处理。

这样测试在 Harness 版本升级后无需手动更新硬编码的行号。

文件

  • test/patch-hunk-counts.test.ts:1 个文件,8 行变更

Replace a hardcoded hunk header string in the patch-hunk-counts test
with a dynamic regex replacement that locates the first hunk in the
package.json section of the dsh patch, so the test remains valid
across Harness version upgrades.
@yaojin3616
yaojin3616 merged commit c12911a into main Sep 26, 2026
4 checks passed
@yaojin3616
yaojin3616 deleted the pr/patch-hunk-counts branch September 26, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant