We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The implemetation here:
func Countdown(out io.Writer, sleeper Sleeper) { for i := countdownStart; i > 0; i-- { sleeper.Sleep() } for i := countdownStart; i > 0; i-- { fmt.Fprintln(out, i) } fmt.Fprint(out, finalWord) }
gives this error:
--- FAIL: TestCountdown (0.00s) --- FAIL: TestCountdown/sleep_before_every_print (0.00s) c:\Testing\mocking\mocking_test.go:60: wanted calls [write sleep write sleep write sleep write] got [sleep sleep sleep write write write write] FAIL
The text was updated successfully, but these errors were encountered:
I'm not sure exactly where you are, so it's very hard for me to offer any help, but these tests do pass.
Maybe have a look here https://github.com/quii/learn-go-with-tests/tree/main/mocking/v5
Sorry, something went wrong.
The function was refactored in the main file you sent:
func Countdown(out io.Writer, sleeper Sleeper) { for i := countdownStart; i > 0; i-- { fmt.Fprintln(out, i) sleeper.Sleep() } fmt.Fprint(out, finalWord) }
but the change was not later made in the tutorial here: https://github.com/quii/learn-go-with-tests/blob/main/mocking.md
No branches or pull requests
The implemetation here:
gives this error:
The text was updated successfully, but these errors were encountered: