deadfoxygrandpa / elm-test

A unit testing framework for Elm
MIT License
204 stars 21 forks source link

elm-test should get out of the business of displaying test results #42

Open greyepoxy opened 8 years ago

greyepoxy commented 8 years ago

Currently elm-test exposes three test runners (elementRunner, consoleRunner, and stringRunner). I purpose that instead of exposing these different kinds of test runners it just exposes a 'run' method that produces some 'testResults' of some kind.

Couple of reasons for this,

  1. Avoid any further issues like #32, this will always be a problem when node specific code is included in the browser and arguably the same type of problem when browser specific code is included in the node version.
  2. Remove unnecessary dependencies, no longer will elm-test have to depend on elm-console.
  3. At least one issue open is related to the output format. #34 Update: I realize now that since elm-test generates its output strings internally that this purposed change won't help with this.
  4. Arguably better cohesion for the package as a whole (only concerned with defining and running tests not displaying the results).

Happy to put forth a pull request but wanted to see your thoughts first since this would require kind of a bigger change across multiple packages. My assumption being that the elementRunner and the consoleRunner would have to be extracted into their own packages.