-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathformatter_paths.feature
44 lines (38 loc) · 1.17 KB
/
formatter_paths.feature
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
39
40
41
42
43
Feature: Formatter Paths
Background:
Given a file named "features/a.feature" with:
"""
Feature: some feature
Scenario: some scenario
Given a passing step
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('@cucumber/cucumber')
Given(/^a passing step$/, function() {})
"""
Scenario: Relative path
When I run cucumber-js with `-f summary:summary.txt`
Then the file "summary.txt" has the text:
"""
1 scenario (1 passed)
1 step (1 passed)
<duration-stat>
"""
Scenario: Absolute path
Given "{{{tmpDir}}}" is an absolute path
When I run cucumber-js with `-f summary:"{{{tmpDir}}}/summary.txt"`
Then the file "{{{tmpDir}}}/summary.txt" has the text:
"""
1 scenario (1 passed)
1 step (1 passed)
<duration-stat>
"""
Scenario: Created relative path
When I run cucumber-js with `-f summary:some/long/path/for/reports/summary.txt`
Then the file "some/long/path/for/reports/summary.txt" has the text:
"""
1 scenario (1 passed)
1 step (1 passed)
<duration-stat>
"""