Improve Test Coverage#982
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 862146707d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
necolas
reviewed
Jul 14, 2026
Comment on lines
+58
to
+59
| - `pieceTable.cm.test.ts` (1): `TextDocument.positionAt` can return a position | ||
| strictly inside a CRLF pair (character beyond `getLineLength`) that its own |
…CodeMirror Ports behavioral edge-case scenarios from microsoft/vscode (MIT) and CodeMirror 6 (MIT) test suites into two new bun:test suites under packages/diffs/test/. 139 tests, including 22 test.failing entries that encode real bugs found during the port (frozen EditStack entries vs non-history edits, undo coalescing, surrogate-pair edit boundaries, CRLF line metadata, and others). Test-only change; fixes land separately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Third legacy-editor harvest, from atom/text-buffer and atom/superstring (both MIT): 56 tests covering search/replace semantics (regex capture expansion, zero-width-match termination, replace-past-own-output, anchored patterns on CRLF), selection remapping under partial-overlap replacements, soft-wrap boundary behavior, history invariant fuzzing, and malformed-position handling. Includes 8 test.failing entries encoding newly found bugs, the worst being: an edit with a NaN position component silently replaces the entire document, and soft-wrap vertical caret motion can land inside a surrogate pair. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Intl.Segmenter's isWordLike classification varies across ICU builds (underscore joining, bare-digit and Han word-ness differ between engines/platforms). Two segmenter-side expansion pins now probe the runtime's segmentation of their own fixture and skip visibly on divergent ICUs instead of failing. Both tests still execute on our dev and CI environments, which agree with the pinned segmentation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completes the previous commit: the Chinese, Japanese, and Latin-Katakana double-click expansion pins depend on the same ICU-variable isWordLike classification (dictionary-based CJK segmentation is the most engine-dependent of all), so they get the same runtime probe treatment via a shared wordLikeSegments helper. Delete-word tests are untouched — the regex classifier is deterministic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per team feedback: the three editor-named test directories are gone and all 195 tests now live in the existing per-domain files (editorPieceTable, editorTextDocument, editorApplyEdits, editorEditStack, editorSelection, editorSearchPanel, editorWrapCaretPosition). Migration was audited name-by-name before deletion: every test present exactly once, all 30 test.failing known-bug pins and 5 ICU skipIf guards preserved. Comments no longer reference other editors; the conventions, known-bug inventory, coverage-gap additions, and a single provenance note moved into test/README.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
resolveIndentEdits inserts the indent unit at column 0 of every line a multi-line selection touches, including empty and whitespace-only lines, injecting trailing whitespace on lines the user never typed on. Outdent round-trips it away, bounding the damage to the indented state. Brings the pinned known-bug count to 31. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
We don't model programmatic edits as a class distinct from local edits, so the scenario's premise (a dead history entry after an untracked edit replaced its region) doesn't match the intended design. The remaining five history-across-untracked-edits pins stand; pinned known-bug count returns to 30. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…quivalence Design decision: edits applied with updateHistory=false are not a semantic class distinct from local edits — a mixed sequence must behave exactly like the same sequence applied all-tracked. The old pins asserted rebasing semantics (untracked edits surviving undo); all are flipped to equivalence assertions whose expected values mirror an all-tracked reference run: undo-to-exhaustion restores the original text, redo-to-exhaustion the final text. The wiped-region test returns under the new model, and the coalescing-across-an-untracked-edit pin flipped from passing to failing because its outcome also deviates from the all-tracked timeline. Cluster: 7 failing pins; suite total 32. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds three new test suites to
packages/diffs/test/– monaco, codemirror, and atom.195 new tests across three suites, 30 real bugs encoded.
For expected failsures they marked with test.failing.
In subsequent pr's ill patch the actual failures (1x1) so they're easier to review.