dwyl / learn-elm-architecture-in-javascript

:unicorn: Learn how to build web apps using the Elm Architecture in "vanilla" JavaScript (step-by-step TDD tutorial)!
https://todomvc-app.herokuapp.com
GNU General Public License v2.0
213 stars 19 forks source link

Unclear sections in the TDD portion #30

Closed finnhodgkin closed 7 years ago

finnhodgkin commented 7 years ago

In section 9.1 the workshop suggests the reset action be named 'res', but then for the rest of the text lists it as 'reset'. There's a premade 'reset' css class so it definitely makes more sense to just keep it as 'reset' the whole way through.

Test instructions

Then in sections 9.4 and 9.5 when writing tests for the reset button UI, the expected behaviour is for the two newly written tests to fail, but what actually happens is test number 5 fails too:

Failing test #5

Although sorting the test is an easy fix, it's not mentioned in the text so could easily be misconstrued by beginners as being due to them messing something else up.

Happy to make a quick PR if you want.

nelsonic commented 7 years ago

@finnhodgkin thanks for reporting this issue. this is indeed unclear (confusing!) if you have time, please fix in PR! 👍

finnhodgkin commented 7 years ago

I also changed the suggested UI tests in section 9.4 - there was an incorrect call to mount (passing in an options object instead of plain arguments) and the final test didn't clear the test counter.

nelsonic commented 7 years ago

@finnhodgkin thanks again! 🎉