Skip to content

Fix test assertions broken by Chinese translation of source strings#17

Merged
studyzy merged 2 commits intofeature/project-understandingfrom
copilot/fix-unit-test-errors
Mar 12, 2026
Merged

Fix test assertions broken by Chinese translation of source strings#17
studyzy merged 2 commits intofeature/project-understandingfrom
copilot/fix-unit-test-errors

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 12, 2026

After translating CLI output strings to Chinese, 16 test assertions across 4 files failed because they still expected English strings.

Updated assertions

  • test/core/init.test.ts — error regexes for "no tools detected" and "invalid profile"
  • test/core/artifact-graph/instruction-loader.test.ts — artifact-not-found error substring
  • test/commands/config-profile.test.ts — workflow diff labels
  • test/commands/artifact-workflow.test.ts — 11 assertions: error messages, section headers, status strings
// Before
expect(output).toContain("Schema 'unknown' not found");
expect(result.stdout).toContain('## Apply: apply-change');
expect(result.stdout).toContain('Blocked');
expect(diff.lines).toEqual(['workflows: removed sync']);

// After
expect(output).toContain("未找到架构 'unknown'");
expect(result.stdout).toContain('## 应用: apply-change');
expect(result.stdout).toContain('被阻塞');
expect(diff.lines).toEqual(['工作流:已移除 sync']);

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: studyzy <1635408+studyzy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unit test errors after source localization Fix unit tests broken by Chinese translation of source strings Mar 12, 2026
@studyzy studyzy marked this pull request as ready for review March 12, 2026 09:06
Copilot AI changed the title Fix unit tests broken by Chinese translation of source strings Fix test assertions broken by Chinese translation of source strings Mar 12, 2026
@studyzy studyzy merged commit 4188a7f into feature/project-understanding Mar 12, 2026
1 check passed
studyzy pushed a commit that referenced this pull request Mar 12, 2026
)

* Fix failing unit tests after Chinese translation of source code
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.

2 participants