-
Notifications
You must be signed in to change notification settings - Fork 9
/
cucumber.js
33 lines (29 loc) · 948 Bytes
/
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
require('dotenv').config({
path: process.env.TEST_ENV ? `.env.${process.env.TEST_ENV}` : '.env',
override: process.env.TEST_ENV ? true : false,
});
require('fs-extra').ensureDir('./test-results/reports');
require('fs-extra').remove('./test-results/screenshots');
require('fs-extra').remove('./test-results/videos');
let options = [
'--require-module ts-node/register',
'--require **/steps/*.ts',
'--require ./src/support/config/hooks.ts',
'--format summary',
'--format rerun:@rerun.txt',
'--format json:./test-results/reports/cucumber.json',
'--publish-quiet true',
`--parallel=${process.env.PARALLEL_THREAD}`,
`--format-options '{"snippetInterface":"async-await"}'`,
`--retry=${process.env.RETRIES}`,
`--tags "not @ignore"`,
].join(' ');
let runner = [
'./features/',
options,
].join(' ');
let rerun = [
'@rerun.txt',
options,
].join(' ');
module.exports = { runner, rerun }