The new test output of elm-program-test breaks the junit output of elm-test.
Error
└─ elm-test --report junit
/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLStringifier.js:210
throw new Error(`Invalid character in string: ${str} at index ${res.index}`);
^
Error: Invalid character in string: ▼ Query.fromHtml
<input id="id"></input>
▼ ProgramTest.fillIn ""
Expected one of the following to exist and have an "oninput" handler:
- <input> with aria-label and id
✓ has tag "input"
✓ has attribute "id" "id"
✗ has attribute "aria-label" ""
- <textarea> with aria-label and id
✗ has tag "textarea" at index undefined
at XMLStringifier.assertLegalChar (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLStringifier.js:210:19)
at XMLStringifier.text (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLStringifier.js:53:21)
at new XMLText (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLText.js:22:37)
at XMLElement.text (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLNode.js:308:17)
at XMLElement.node (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLNode.js:294:17)
at XMLElement.element (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLNode.js:187:30)
at XMLElement.element (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLNode.js:163:32)
at XMLElement.element (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLNode.js:158:27)
at XMLElement.element (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLNode.js:148:34)
at XMLDocument.element (/nix/store/yyi707rsplzcqw9917swgkk70ckl69jy-elm-test-0.19.1-revision7/lib/node_modules/elm-test/node_modules/xmlbuilder/lib/XMLNode.js:158:27)
The new test output of elm-program-test breaks the junit output of elm-test.
Error
Reproduce
Run:
elm-test --report junit
Potential Fix
We could include a
invalidCharReplacement
option as per https://github.com/oozcitak/xmlbuilder-js/issues/147#issuecomment-604375441