Skip to content

Commit 047e1d7

Browse files
glennjIsaacGtasxatzial
committed
Apply suggestions from code review
Co-authored-by: Isaac Good <[email protected]> Co-authored-by: Anastasios Chatzialexiou <[email protected]>
1 parent 580f4a1 commit 047e1d7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

using/solving-exercises/tdd.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,25 @@ Should you choose to work with a mentor (and we encourage you to do that once yo
3434
When you're working in the code editor on Exercism's website, you can read the tests but you are not able to edit them.
3535
All tests will be executed each time you run them, regardless of any "skip" mechanisms noted in the test file.
3636

37-
Test results will default to expanding the first failed test message (although what is displayed varies by track).
37+
When there are multiple tests that fail, three website initially only displays the results of the first failure.
38+
You can click on other failures to expand them, too!
39+
Sometimes the first result may not be the most informative.
3840

3941
Don't be discouraged by a large number of failing tests.
4042
Focus on making them pass one-by-one.
4143

4244
## Working locally
4345

4446
Many tracks use "skipped" tests in their test files.
45-
Initially, only the first test is "active" and the remaining are deactivated (how this happens varies by track).
47+
Initially, only the first test is "active" and the remaining are inactive (how this happens varies by track).
4648
When you run the test suite in your environment, only the first test runs.
4749
We do this to encourage you to follow this workflow:
4850

4951
1. Before adding any new code, run the test suite: you should see a failing test.
5052
1. Add _just enough_ code to pass the test.
5153
1. Run the test suite.
5254
1. If the test still fails, repeat step 2.
53-
1. Once the test passes, refactor your code as desired, ensuring all the activated tests still pass.
55+
1. Once the test passes, refactor your code as desired, ensuring all active tests still pass.
5456
Refactoring might include:
5557
- removing any duplicated code,
5658
- spliting long functions into smaller ones
@@ -63,13 +65,13 @@ Once all the tests are passing, congratulations, you have solved the exercise!
6365
Exactly how tests are "unskipped" (or activated) depends on the track.
6466
For some tracks, it might be commenting or removing an annotation.
6567
For some tracks, it might be changing an attribute from true to false.
66-
Take the time to read [the documentation for your track][track-docs]: it will explain these details.
68+
Take the time to read [the documentation for your track][track-docs]; it will explain these details.
6769

6870
For tracks that don't skip the tests, applying this workflow may be as straightforward as commenting out the tests and uncommenting them one-by-one.
6971

7072
## Rationale for Test-Driven Development
7173

72-
While it may seem like "putting the cart before the horse", there are several good reasons why you might want to write unit tests before writing the implementation code:
74+
While it may seem like "putting the cart before the horse", there are several good reasons why you might want to write unit tests before writing the implementation code.
7375

7476
1. Design.
7577
It forces you to think first about the design of the **interface** to the code, instead of jumping straight to the implementation.

0 commit comments

Comments
 (0)