-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
cucumber.js
26 lines (23 loc) · 1.03 KB
/
cucumber.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* https://github.com/cucumber/cucumber-js/blob/main/docs/nodejs_example.md
* https://github.com/cucumber/cucumber-js/blob/main/docs/cli.md
* https://github.com/cucumber/cucumber-pretty-formatter
*/
const common = ['--publish-quiet ', "--require-module ts-node/register --require 'features/**/*.ts'"];
switch (process.env.CI) {
case 'true':
common.push('--format html');
break;
case 'json':
common.push('--format message');
break;
case 'false':
default:
common.push(
'--format @cucumber/pretty-formatter --format-options \'{"theme":{"datatable border":["green"],"datatable content":["green","italic"],"docstring content":["green","italic"],"docstring delimiter":["green"],"feature description":["green"],"feature keyword":["bold","green"],"rule keyword":["yellow"],"scenario keyword":["greenBright"],"scenario name":["green","underline"],"step keyword":["bgGreen","black","italic"],"step text":["greenBright","italic"],"tag":["green"]}}\' '
);
break;
}
module.exports = {
default: common.join(' ')
};