Skip to content

Add missing tests to verify behaviour when either old, new, or both strings are empty - #714

Merged
ExplodingCabbage merged 1 commit into
masterfrom
add-missing-tests
Oct 7, 2026
Merged

ExplodingCabbage merged 1 commit into
masterfrom
add-missing-tests

Conversation

@ExplodingCabbage

Copy link
Copy Markdown
Collaborator

(The behaviour in the case where you diff empty vs empty was, in particular, worth having documented by a test, to avoid inadvertently changing it, and previously no such test existed.)

…trings are empty

(The behaviour in the case where you diff empty vs empty was, in particular, worth having documented by a test, to avoid inadvertently changing it, and previously no such test existed.)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused tests capture existing behavior, and no unresolved issues were identified.

0 open findings

What changed in this PR

Adds regression tests documenting character-diff behavior with empty strings, without changing implementation.

Changes:

  • Verifies insertion-only and deletion-only results when one input is empty.
  • Confirms that two empty inputs produce an empty change list.
File Description
test/​diff/​character.js Adds three empty-input regression tests.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ExplodingCabbage
ExplodingCabbage merged commit 5a8290c into master Oct 7, 2026
1 check passed
@ExplodingCabbage
ExplodingCabbage deleted the add-missing-tests branch October 7, 2026 21:01
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