You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with: node node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend avoiding the use of globally installed Mocha.
Description
The xunit reporter always encodes everything, but if there's some Chinese characters, the report file will
generate something like this:
<testsuitename="Mocha Tests"tests="1"failures="1"errors="1"skipped="0"timestamp="Thu, 29 Nov 2018 03:23:34 GMT"time="0.035">
<testcaseclassname="百度"name="首页"time="0.003"><failure>expected '测试' to equal '错误'
AssertionError: expected '测试' to equal '错误'
at Context.<anonymous> (C:/Users/ybbpg/Desktop/node-test/test/test.js:10:17)</failure></testcase>
</testsuite>
Totally unreadable, is there any way to avoid this?
Steps to Reproduce
Make test.js file:
import"chai/register-should";describe("中文测试",function(){it("测试",()=>{"测试".should.equal("测试 Not Equal");// Will get error});});
Expected behavior: [What you expect to happen]
Don't encode classname, name, and body of testcase.
<testsuitename="Mocha Tests"tests="1"failures="1"errors="1"skipped="0"timestamp="Thu, 29 Nov 2018 03:25:19 GMT"time="0.039">
<testcaseclassname="中文测试"name="测试"time="0.004"><failure>expected 测试 to equal 测试 Not Equal
AssertionError: expected 测试 to equal 测试 Not Equal
at Context.<anonymous> (C:/Users/ybbpg/Desktop/node-test/test/test.js:10:17)</failure></testcase>
</testsuite>
Actual behavior: [What actually happens]
Encode everything.
<testsuitename="Mocha Tests"tests="1"failures="1"errors="1"skipped="0"timestamp="Thu, 29 Nov 2018 03:25:19 GMT"time="0.039">
<testcaseclassname="中文测试"name="测试"time="0.004"><failure>expected '测试' to equal '测试 Not Equal'
AssertionError: expected '测试' to equal '测试 Not Equal'
at Context.<anonymous> (C:/Users/ybbpg/Desktop/node-test/test/test.js:10:17)</failure></testcase>
</testsuite>
Reproduces how often: 100%
Versions
The output of mocha --version and node node_modules/.bin/mocha --version: 5.2.0
The output of node --version: v10.12.0
The version and architecture of your operating system: win 10
Your shell (bash, zsh, PowerShell, cmd, etc.): PowerShell
Your browser and version (if running browser tests): chrome
Any other third party Mocha related modules (with versions): chai 4.2.0
The code transpiler being used: babel 6.26.0
The text was updated successfully, but these errors were encountered:
This open question has existed for quite a while without a concrete answer. Per #5027 we've moved question-asking to Discord. If you're reading this and interested, please:
Prerequisites
faq
labelnode node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend avoiding the use of globally installed Mocha.Description
The xunit reporter always encodes everything, but if there's some Chinese characters, the report file will
generate something like this:
Totally unreadable, is there any way to avoid this?
Steps to Reproduce
test.js
file:report/jUnit.xml
.Expected behavior: [What you expect to happen]
Don't encode classname, name, and body of testcase.
Actual behavior: [What actually happens]
Encode everything.
Reproduces how often: 100%
Versions
mocha --version
andnode node_modules/.bin/mocha --version
: 5.2.0node --version
: v10.12.0The text was updated successfully, but these errors were encountered: