-
Notifications
You must be signed in to change notification settings - Fork 35
Alternative (safer) Test.Runner API? #179
Comments
This is between @rtfeldman and you. I don't have a huge preference other than that you don't break things. I think it would be reasonable to add the new functions in a minor release and deprecate (but not remove) the old ones. We're looking at some breaking changes in #183 so it would be good to bundle the removal of the old interface together with that. |
I like this idea! Another thing I think is worth incorporating: I talked about this with @mgold at some point, but I can't remember where it's written down - exposing a union type for the different built-in expectation types, e.g. Examples of what this breaking change would let us do:
|
@rtfeldman glad you like the direction. We're actually working on changing the awkward ASCII art in the html runner now 😄. Thinking about how to move this forward leaves me with a couple of questions:
I think this API actually solves #194 outright, which is a nice consequence. |
I think html-test-runner is going to folded into Richard's runner, so this issue seems finished. |
TLDR: Test.Runner.Exploration
Test.Runner has a fairly "query-driven" module which doesn't enforce some of the rules that Test discusses. Here are a couple example:
Rules like this could enforced internally to
elm-test
, which would simplify and protect call sites.Additionally, an alternative API could let simplify the labeling by enforcing that formatLabels is actually used.
I suspect an API change could simplify some
elm-test
internals as well, but I haven't looked through this code base.I've started to incorporate some of these concerns in
html-test-runner
's Test.Runner.Exploration.It's mostly to serve as a discussion point, since there are some obvious changes that need to happen:
formatLabel
as discussed above (aka, don't exposelabels : List String
)wrapper : (() -> List Expectation) -> () -> List Expectation
param so thatnode-test-runner
can catch exceptionsTest.Runner
is currently labeled as "experts only" module, but I don't think it has to be!The text was updated successfully, but these errors were encountered: