lukeed / lukeed/uvu

Assertion failure output trims newlines in string match failure

Open
#199 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3k
Forks
101
PR merge metrics
No merged PRs in 30d

Description

Output of assertion failure:

```
FAIL CLI "version"
Version command output is as expected. (equal)

Actual:
--nodekit,·1.0.0
Expected:
++nodekit,·1.0.0

at assert (file:///home/aral/Projects/small-web/nodekit/app/node_modules/uvu/assert/index.mjs:33:8)
at Module.equal (file:///home/aral/Projects/small-web/nodekit/app/node_modules/uvu/assert/index.mjs:45:2)
```

(The first line has a newline at the end but it is being trimmed, making it impossible to tell what the difference is from looking at the error message.)

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the CLI version assertion and inspect the assertion implementation shown in node_modules/uvu/assert/index.mjs. Verify how string differences are formatted, then ensure trailing newlines remain distinguishable in the failure output and rerun the failing assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.