Skip to content

fix: correct test expectation for U+3000 ideographic space under NFKC normalization#25490

Merged
pelikhan merged 1 commit intomainfrom
copilot/fix-tests-again
Apr 9, 2026
Merged

fix: correct test expectation for U+3000 ideographic space under NFKC normalization#25490
pelikhan merged 1 commit intomainfrom
copilot/fix-tests-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

sanitize_title.test.cjs had a wrong expectation: it asserted that the ideographic space U+3000 ( ) would survive hardenUnicodeText, but NFKC normalization (step 6) maps U+3000 → U+0020.

Change

  • Updated the expected value in the "should convert fullwidth ASCII to standard ASCII" test case from "Test 123" (U+3000) to "Test 123" (U+0020)
  • Corrected the inline comment, which incorrectly stated U+3000 was not converted
// Before — wrong: NFKC does convert U+3000
expect(sanitizeTitle("Test 123")).toBe("Test 123");

// After — correct
expect(sanitizeTitle("Test 123")).toBe("Test 123");

@pelikhan pelikhan marked this pull request as ready for review April 9, 2026 14:20
Copilot AI review requested due to automatic review settings April 9, 2026 14:20
@pelikhan pelikhan merged commit 51b6638 into main Apr 9, 2026
53 of 54 checks passed
@pelikhan pelikhan deleted the copilot/fix-tests-again branch April 9, 2026 14:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an incorrect test expectation around Unicode normalization: under NFKC, the ideographic space U+3000 is normalized to a regular space U+0020, so it should not survive hardenUnicodeText.

Changes:

  • Updated the expected output in the “fullwidth ASCII” test to use U+0020 instead of U+3000.
  • Corrected the inline comment to reflect the actual NFKC behavior.
Show a summary per file
File Description
actions/setup/js/sanitize_title.test.cjs Updates the test expectation/comment to match NFKC normalization behavior (U+3000 → U+0020).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

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.

3 participants