Escape YAML characters in error output
lkipke opened this issue · comments
Summary
We're not escaping strings in our YAML output, which is causing some weirdness:
m.assert.equal("[what?", "yeah...")
The above causes tap-mocha-parser
to incorrectly parse our YAML output, so we print out the raw (normally hidden) YAML:
---
error:
message: Unexpected result
name: m.assert.equal
stack: m.assert.equal (/sandbox/tests/source/utils.test.brs:17:14)
stackframes:
- /sandbox/tests/source/utils.test.brs:17:14
- /sandbox/tests/source/utils.test.brs:2:11
- /sandbox/tests/source/utils.test.brs:2:4
found: [what?
wanted: yeah...
...
This actually isn't awful. It gives the user more information than tap-mocha-reporter
does -- but it also doesn't look very nice and is an unexpected result.