qunitjs / qunitjs/qunit

Diff only leafs for (big) objects

Open
#363 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Diff help welcome Type: Enhancement
Dominant language
JavaScript
Stars
4k
Forks
773
PR merge metrics
No merged PRs in 30d

Description

When comparing big object structures, the current diff output has too much overhead. Comparing each leaf and showing the path, actual, expected (and diff) for just the leaf would be much more useful. It won't replace the regular diff, e.g. comparing (long) strings wouldn't profit from this.

In other words, we'd have to find the properties that are different, serialize and diff those, and not output the rest, or at least compress it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is identified in the issue. Start by tracing how QUnit currently produces diffs for large objects, then compare possible leaf-only output against the existing regular diff behavior. Done means differing leaf paths show their actual and expected values without unrelated object output, while long-string comparisons retain the regular diff.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.