-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcucumber.js
38 lines (34 loc) · 1.26 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
27
28
29
30
31
32
33
34
35
36
37
38
const common = [
// '--require-module dotenv/config',
'--require-module ts-node/register',
'--require-module tsconfig-paths/register',
'--require src/**/*.ts',
'--publish-quiet',
];
const flags = ['--fail-fast'];
const defaultParams = flags.concat(common).join(' ');
const formatOptions = {
theme: {
'feature keyword': ['bold', 'green'],
'feature description': ['greenBright'],
'scenario keyword': ['blueBright', 'bold', 'underline'],
'scenario name': ['blueBright', 'underline'],
'step keyword': ['blueBright'],
'step text': ['white'],
tag: ['grey', 'italic'],
},
};
const reportParams = [
'--format html:reports/cucumber-report.html',
'--format summary:reports/cucumber-summary.txt',
'--format message:reports/cucumber-messages.ndjson',
'--format progress', // progress-bar, progress, summary
'--format usage:reports/cucumber-usage.txt',
'--format @cucumber/pretty-formatter',
`--format-options ${JSON.stringify(formatOptions)}`,
].join(' ');
module.exports = {
// https://github.com/cucumber/cucumber-js/blob/master/docs/cli.md
default: `${defaultParams} src/features/**/*.feature`,
withReports: `${defaultParams} ${reportParams} src/features/**/*.feature`,
};