GitXplorerGitXplorer
d

kata-doppelganger

public
12 stars
53 forks
0 issues

Commits

List of commits on branch main.
Unverified
1bd5ea8772e605d54f15381c284188703faab333

python: fix test name

ddmerejkowsky committed 10 days ago
Unverified
0d58f1d6b45d45cff727b76f94977a5a319812a3

Add maven wrapper

ddmerejkowsky committed 2 months ago
Unverified
01af97c6b563e7cc4e85054dde51bfe9ca77a3b3

Update README.md

ddmerejkowsky committed 2 months ago
Unverified
e018b6f27ea35dd7ad8acaa519a8181a0e239f41

Clarify README again

ddmerejkowsky committed 2 months ago
Unverified
89e075a2f582532f9ef0246753dae42d6299cf45

js: port test suite to jest instead of tape

ddmerejkowsky committed 2 months ago
Unverified
005cc29b3b7b59373d4df92ec0e16260ad27592c

Update README

ddmerejkowsky committed 2 months ago

README

The README file for this repository.

Doppelganger

Goal: learn about the various types of test doubles

Instructions

There are bugs in the code (marked with a Bug! comment), but all the tests are passing.

For each test, you will find a TODO comment. Your job is to finish the implementation of each test and make them fail for the right reason, i.e, triggering the bugs. You must do so by adding only test code - you are not allowed to change the production code.

Here's the order in which you should fix the test - they go from easiest to trickiest :)

  1. SafeCalculator
  2. DiscountApplier
  3. MailSender

Part 1 - without any library

For this part, you are not allowed to add any external mock library (using the test framework is ok)

Start by writing the tests naively - and then make it run (or compile) by adding clases to the test code (this is what we call a test double).

Part 2 - with a library

Use a library like mockito for Java, unittest.mock for Python or sinon for JavaScript to rewrite all the tests.

Part 3 - debrief

Which version do you prefer? Why?