Skip to content

Commit 95544b6

Browse files
kevgocharlierudolph
authored andcommitted
Use cross-platform symbols (#635)
1 parent 91c7171 commit 95544b6

9 files changed

+28
-26
lines changed

features/multiple_formatters.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Feature: Multiple Formatters
3131
Feature: some feature
3232
3333
Scenario: I've declared one step which passes
34-
Given This step is passing
34+
Given This step is passing
3535
3636
1 scenario (1 passed)
3737
1 step (1 passed)

features/pretty_formatter.feature

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Feature: Pretty Formatter
5050
Feature: some feature
5151
5252
Scenario: I've declared one step which passes
53-
Given This step is passing
53+
Given This step is passing
5454
5555
1 scenario (1 passed)
5656
1 step (1 passed)
@@ -130,12 +130,12 @@ Feature: Pretty Formatter
130130
Feature: some feature
131131
132132
Scenario: some scenario
133-
Given a basic step
134-
And a step with a doc string
133+
Given a basic step
134+
And a step with a doc string
135135
\"\"\"
136136
my doc string
137137
\"\"\"
138-
And a basic step
138+
And a basic step
139139
140140
1 scenario (1 passed)
141141
3 steps (3 passed)
@@ -164,7 +164,7 @@ Feature: Pretty Formatter
164164
Feature: some feature
165165
166166
Scenario: some scenario
167-
Given a table:
167+
Given a table:
168168
| foo\nbar | bar | baz |
169169
| foo\nbar\n\nbaz\n\\boo | bar | baz\nfoo |
170170

features/profiles.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Feature: default command line arguments
6969
Feature: some feature
7070
7171
Scenario: some scenario
72-
Given a passing step
72+
Given a passing step
7373
7474
1 scenario (1 passed)
7575
1 step (1 passed)

features/rerun_formatter.feature

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Feature: Rerun Formatter
4747
Feature: A
4848
4949
Scenario: 1
50-
Given a passing step
50+
Given a passing step
5151
5252
1 scenario (1 passed)
5353
1 step (1 passed)
@@ -64,7 +64,7 @@ Feature: Rerun Formatter
6464
Feature: A
6565
6666
Scenario: 1
67-
Given a passing step
67+
Given a passing step
6868
6969
Scenario: 2
7070
✖ Given a failing step
@@ -75,7 +75,7 @@ Feature: Rerun Formatter
7575
Feature: B
7676
7777
Scenario: 4
78-
Given a passing step
78+
Given a passing step
7979
8080
Scenario: 5
8181
✖ Given a failing step

features/target_specific_scenarios_by_line.feature

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Feature: Target specific scenarios
3737
Feature: some feature
3838
3939
Scenario: first scenario
40-
When a step is passing
40+
When a step is passing
4141
4242
1 scenario (1 passed)
4343
1 step (1 passed)
@@ -52,7 +52,7 @@ Feature: Target specific scenarios
5252
Feature: some feature
5353
5454
Scenario: third scenario
55-
When a step is passing
55+
When a step is passing
5656
5757
Scenario: third scenario
5858
? When a step is pending
@@ -78,7 +78,7 @@ Feature: Target specific scenarios
7878
Feature: some feature
7979
8080
Scenario: third scenario
81-
When a step is passing
81+
When a step is passing
8282
8383
1 scenario (1 passed)
8484
1 step (1 passed)
@@ -93,10 +93,10 @@ Feature: Target specific scenarios
9393
Feature: some feature
9494
9595
Scenario: first scenario
96-
When a step is passing
96+
When a step is passing
9797
9898
Scenario: second scenario
99-
When a step is passing
99+
When a step is passing
100100
101101
2 scenarios (2 passed)
102102
2 steps (2 passed)

features/target_specific_scenarios_by_tag.feature

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Feature: Target specific scenarios
4343
4444
@a
4545
Scenario: first scenario
46-
When a step is passing
46+
When a step is passing
4747
4848
1 scenario (1 passed)
4949
1 step (1 passed)
@@ -59,7 +59,7 @@ Feature: Target specific scenarios
5959
6060
@a
6161
Scenario: first scenario
62-
When a step is passing
62+
When a step is passing
6363
6464
1 scenario (1 passed)
6565
1 step (1 passed)
@@ -75,7 +75,7 @@ Feature: Target specific scenarios
7575
7676
@b @c
7777
Scenario: second scenario
78-
When a step is passing
78+
When a step is passing
7979
8080
@b @c
8181
Scenario: second scenario
@@ -117,7 +117,7 @@ Feature: Target specific scenarios
117117
118118
@b @c
119119
Scenario: second scenario
120-
When a step is passing
120+
When a step is passing
121121
122122
@b @c
123123
Scenario: second scenario

lib/cucumber/listener/pretty_formatter.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
function PrettyFormatter(options) {
22
var Cucumber = require('../../cucumber');
3+
var figures = require('figures');
34

45
var colors = Cucumber.Util.Colors(options.useColors);
56
var self = Cucumber.Listener.Formatter(options);
@@ -16,9 +17,9 @@ function PrettyFormatter(options) {
1617
};
1718

1819
var characters = {};
19-
characters[Cucumber.Status.AMBIGUOUS] = '✖';
20-
characters[Cucumber.Status.FAILED] = '✖';
21-
characters[Cucumber.Status.PASSED] = '✓';
20+
characters[Cucumber.Status.AMBIGUOUS] = figures.cross;
21+
characters[Cucumber.Status.FAILED] = figures.cross;
22+
characters[Cucumber.Status.PASSED] = figures.tick;
2223
characters[Cucumber.Status.PENDING] = '?';
2324
characters[Cucumber.Status.SKIPPED] = '-';
2425
characters[Cucumber.Status.UNDEFINED] = '?';

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
"commander": "^2.9.0",
114114
"cucumber-html": "^0.2.3",
115115
"duration": "^0.2.0",
116+
"figures": "1.7.0",
116117
"gherkin": "^4.0.0",
117118
"glob": "^7.0.0",
118119
"is-generator": "^1.0.2",

spec/cucumber/listener/pretty_formatter_spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ describe("Cucumber.Listener.PrettyFormatter", function () {
230230

231231
it('logs the keyword and name', function () {
232232
var expected =
233-
' ' + colors.green(' step-keyword step-name') + '\n';
233+
' ' + colors.green(' step-keyword step-name') + '\n';
234234
expect(logged).toEqual(expected);
235235
});
236236
});
@@ -296,7 +296,7 @@ describe("Cucumber.Listener.PrettyFormatter", function () {
296296

297297
it('logs the keyword', function () {
298298
var expected =
299-
' step-keyword ' + '\n';
299+
' step-keyword ' + '\n';
300300
expect(colors.strip(logged)).toEqual(expected);
301301
});
302302
});
@@ -315,7 +315,7 @@ describe("Cucumber.Listener.PrettyFormatter", function () {
315315

316316
it('logs the keyword and name and data table', function () {
317317
var expected =
318-
' step-keyword step-name' + '\n' +
318+
' step-keyword step-name' + '\n' +
319319
' | cuk | cuke | cukejs |' + '\n' +
320320
' | c | cuke | cuke.js |' + '\n' +
321321
' | cu | cuke | cucumber |' + '\n';
@@ -333,7 +333,7 @@ describe("Cucumber.Listener.PrettyFormatter", function () {
333333

334334
it('logs the keyword and name and doc string', function () {
335335
var expected =
336-
' step-keyword step-name' + '\n' +
336+
' step-keyword step-name' + '\n' +
337337
' """' + '\n' +
338338
' this is a multiline' + '\n' +
339339
' doc string' + '\n' +

0 commit comments

Comments
 (0)