Closed mariohuizar closed 5 years ago
@zwilias My plan is to modify elm-coverage in 4 ways:
./elm.json
file to .coverage/instrumented/elm.json
./tests
folder into `.coverage/instrumented/testselm.json
source directories, stop using native code and return ()
instead of never
fake-elm
script to the elm coverage package that passes arguments along to elm make
. When elm-coverage
invokes elm-test
I will add the argument --compiler=fake-elm
. The fake elm script will call elm make
normally, then after elm make
finishes successfully, look at the --output
flag passed to elm make
to modify the generated js code (In the current version of elm-test
this file is called elmTestOutput.js
). I will insert the old Native.Coverage.js
impl by regex replacing the JS function definition corresponding to Coverage.track..coverage/instrumented
directory instead of project root..coverage/instrumented/
directory instead of from .coverage
.@RavenDream Awesome, that would be really cool. Some questions, though!
copy the ./tests folder into `.coverage/instrumented/tests
Any particular reason this would be required?
Run elm-test in the .coverage/instrumented directory instead of project root.
I think this already happens, doesn't it?
Read the generated coverage log files from the .coverage/instrumented/ directory instead of from .coverage.
Is there a specific reason for wanting to do this?
Elm 0.19 support was just released as a beta - npm i elm-coverage@beta
should get you the goods.
Some notes!
elm-instrument
to build on the latest elm-format
so it can actually handle 0.19 syntax
Any plans to update for elm0.19?