mjackson / mjackson/expect

Remove spy.reset

Open
#144 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

semver-major: breaking change
Dominant language
JavaScript
Stars
2.3k
Forks
115
PR merge metrics
No merged PRs in 30d

Description

The meaning of spy.reset is ambiguous (see discussion in #138). What exactly does it reset? The call count? The return/thrown values?

My vote is to either remove it or make its meaning more clear. If we remove it, the simple upgrade path is to substitute all uses of spy.reset() with spy.calls = []. Super easy.

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

Start by reading the discussion in issue #138 and search the repository for spy.reset() and spy.calls. Determine whether the project will remove the ambiguous API or clarify its behavior; done means the chosen behavior is reflected consistently in the implementation and all existing uses.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.