dwyl / dwyl/learn-tdd

Code Checkpoint/Example at the "Watch It Fail" Section

Open
#100 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
2.8k
Forks
340
PR merge metrics
No merged PRs in 30d

Description

I was _just_ sitting with someone _totally_ `new` to JS TDD doing this tutorial and they felt the instructions were unclear _just_ before the _first_ "***Watch it Fail***" stage:
https://github.com/dwyl/learn-tdd/tree/bcbdc58a41faec5480fb5cbec96a0ca587a3c2e9#watch-it-fail

This could be _enhanced_ by showing people a _full_ `index.html` as a "Check Point"
so people know where the function and test "_goes_" in the file.
e.g:
```html



Vending Machine Change Calculator TDD





Vending Machine Change Calculator


Calculate the Change for a Given Price and Cash Received





// your solution will go here!


test('getChange(1,1) should equal [] - an empty array', function(assert) {
var result = getChange(1, 1); //no change/coins just an empty array
var expected = [];
assert.deepEqual(result, expected);
}); // use deepEqual for arrays see: https://api.qunitjs.com/deepEqual/


```

Contributor guide

Open the contributing guide

Research direction

Read the linked tutorial's "Watch It Fail" section and locate the referenced index.html structure. Add a full checkpoint example before the first failing test so readers can see where the function and QUnit test belong. Done means the section clearly shows the complete file context and the existing getChange(1, 1) test remains understandable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, testing
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.