Open mpizenberg opened 2 years ago
Semi-related question:
Currently we have to merge elm-test-rs
output to the Exercism extract-test-code
output. Would it be possible to do all of those operations in the same place? Can extract-test-code
be used via exercism/elm-reporter
somehow?
Not currently, because the reporter of the test runner doesn't have access to the associated code.
Actually not only the reporter, there is no part of the test runner that can match exactly an instance of Test
with corresponding code. This is because of the dynamic nature of creating tests value because any expression can be used to create test values in a test file. Only top level tests are detected by the test runner and passed to elm-exploration/test
that extracts the full detailed list of test values from that Test
.
Due to an issue with the
name
field in the exercism report of elm-test-rs, we needed to update both thempizenberg/elm-test-runner
elm package with the fix (https://github.com/mpizenberg/elm-test-runner/pull/12) and then theelm-test-rs
executable to use that new version of the reporter package.Related to another issue, I came to the conclusion that it would be possible (I think) to enable custom reporters, configured directly with command line arguments of the
elm-test-rs
executable. I've detailed the approach a bit more in that issue: https://github.com/mpizenberg/elm-test-runner/issues/11I'm linking this here, because I think doing this will benefit exercism since essentially, we could be using it like follows:
This would enable any update to the exercism reporter code, as long as it's still compatible with the version of
mpizenberg/elm-test-runner
used byelm-test-rs
.