This PR updates behavior of jsonReporter for writing its key.
While coverage JSON takes path to file its key of coverage data, json reporter directly write key into file. This causes problem on windows machines since its path contains escape chars for backslash, makes stored JSON is not valid and can't be parsed directly. In this pr, stringify key as well to preserve escape chars on windows. This does not affect on non-windows system.
This PR updates behavior of
jsonReporter
for writing its key.While coverage JSON takes path to file its key of coverage data, json reporter directly write key into file. This causes problem on windows machines since its path contains escape chars for backslash, makes stored JSON is not valid and can't be parsed directly. In this pr,
stringify
key as well to preserve escape chars on windows. This does not affect on non-windows system.before
after