Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mocha option from colors -> color #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
mochaOptions = mochaOptions || {
ui: 'bdd',
reporter: 'spec',
colors: true
color: true
};

mocha.setup(mochaOptions);
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MochaChrome {
mocha: {
reporter: 'spec',
ui: 'bdd',
colors: true
color: true
}
},
options
Expand Down
4 changes: 2 additions & 2 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ if (!/^(file|http(s?)):\/\//.test(file)) {
url = `file://${fs.realpathSync(file)}`;
}

const colors = !!flags.colors;
const color = !!flags.color;
const reporter = flags.reporter || 'spec';
const mocha = Object.assign(JSON.parse(flags.mocha || '{}'), { colors, reporter });
const mocha = Object.assign(JSON.parse(flags.mocha || '{}'), { color, reporter });
const chromeFlags = JSON.parse(flags.chromeFlags || '[]');
const {
chromeLauncher = {},
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"LICENSE",
"README.md"
],
"peerDependencies": {
"mocha": ">= 7.0.0"
},
"dependencies": {
"chalk": "^2.0.1",
"chrome-launcher": "^0.13.4",
Expand Down
2 changes: 1 addition & 1 deletion test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function test(options) {
options = deepAssign(
(options = {
url,
mocha: { colors: false },
mocha: { color: false },
ignoreConsole: true,
ignoreExceptions: true,
ignoreResourceErrors: true
Expand Down