exercism / elm-test-runner

GNU Affero General Public License v3.0
3 stars 5 forks source link

Problem when using `Debug.log` #5

Closed mpizenberg closed 4 years ago

mpizenberg commented 4 years ago

I just realized that using Debug.log inside the code will print to the junit report.xml file making it invalid and crashing the python script converting the junit report to exercism format. I can see two "solutions",

iHiD commented 4 years ago

In Ruby, I provide a specific method debug() to use instead of the normal puts/print options. This captures the output and pops it in the correct place in the results.json. @ErikSchierboom captured the stdout and put it in the right place instead I believe.

ErikSchierboom commented 4 years ago

Actually, my test framework has a special method to capture output, which I then link up to the default console output methods. But I know other tracks just capture stdout.