EPISODE · Aug 10, 2020 · 1H
010: elm-test
from Elm Radio · host Dillon Kearns
elm-test Basicselm-test NPM packageelm-explorations/test Elm packageelm-test init commandRunning elm-test finds exposed values of type TestTDD PrinciplesTesting in Elm is easier because it's just expectations of input to output (deterministic)TDD is a design practice tooProgramming by IntentionWriting test first makes code testable & decoupledRed, green, refactorYAGNI"Make the change easy, then make the easy change"Kent Beck's TDD by ExampleHere's a staring template of a code kata in Elm that you can use to practiceEmily Bache has many more code katas you can practice on her GitHubFuzz TestingAlso known as Property-Based TestingMartin Janiczek's elm-minithesis projectelm-test's view testing API includes Test.Html.Query, Test.Html.Selector, and Test.Html.Event View objectsTesting pyramidMocking and stubbing are not needed or possible in ElmOrder dependent test helper in Ruby: i_suck_and_my_tests_are_order_dependentWhen to Use Types or TestsJeroen's Safe Unsafe Operations blog postRichard Feldman's talk on Types and TestsMake Impossible StatesShould you test implementation details?Discourse thread discussing testing internalsThink in terms of a modules responsibilityHigher-Level Testing in Elmelm-program-test Martin Janiczek's elm Europe talk on testing Msg's with ArchitectureTestRichard test-update package
What this episode covers
We discuss the fundamentals of test-driven development, and the testing tools in the Elm ecosystem.
NOW PLAYING
010: elm-test
No transcript for this episode yet