提交 0938fe05 编写于 作者: D Dirk Baeumer

Use dot reporter under Windows since spec doesn't handle ANSI color characters...

Use dot reporter under Windows since spec doesn't handle ANSI color characters due to the fact that tests are executed as an electron app
上级 1281eab3
......@@ -17,7 +17,7 @@ const optimist = require('optimist')
.describe('build', 'run with build output (out-build)').boolean('build')
.describe('coverage', 'generate coverage report').boolean('coverage')
.describe('debug', 'open dev tools, keep window open, reuse app data').string('debug')
.describe('reporter', 'the mocha reporter').string('reporter').default('reporter', 'spec')
.describe('reporter', 'the mocha reporter').string('reporter').default('reporter', process.platform === 'win32' ? 'dot' : 'spec')
.describe('help', 'show the help').alias('help', 'h');
const argv = optimist.argv;
......@@ -113,7 +113,7 @@ app.on('ready', () => {
Reporter = require(reporterPath);
} catch (err) {
console.warn(`could not load reporter: ${argv.reporter}`);
Reporter = mocha.reporters.Spec;
Reporter = process.platform === 'win32' ? mocha.reporters.Dot : mocha.reporters.Spec;
}
const runner = new IPCRunner();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册