testdouble / testdouble/testdouble.js

Add generator function support

Open
#276 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.4k
Forks
140
Avg merge
22h
Merged PRs (30d)
1

Description

testdouble.js does not currently support generators. Prior to 3.2, td.replace would replace them as it would any other function, but this was accidental in that the resulting functions didn't really behave like generator functions.

We need to think through what a fake generator would look like and how it would be stubbed/verified. Right now I have no real idea because I haven't seen many useful, isolated examples of them.

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 with td.replace and the library’s existing treatment of ordinary functions. Research isolated JavaScript generator examples, then define what a fake generator should do and how it should be stubbed and verified. Done means the behavior and API are agreed on and covered by tests.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.