testdouble / testdouble/testdouble.js
Improve stringification of captor.capture() matcher
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 140
- Avg merge
- 22h
- Merged PRs (30d)
- 1
Description
right now, captor.capture() matchers are printed out with an ugly toString() in error messages. they should be niceified like the other matchers.
currently just got:
All calls of the test double, in order were:
- called with `("target", undefined, function (name, originalValue) {
return (0, _chainPrototype2.default)(overwriteChild(originalValue, '.' + name), name, originalValue, original);
})`.
That whole third arg should have been captor.capture() or the like
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the captor.capture() matcher and the stringification path used for matcher error messages, then compare it with the formatting used by other matchers. Reproduce the shown call-output case and verify that the third argument is rendered as captor.capture() or equivalent rather than the generated function source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100