Skip to content

Commit 08f7ab4

Browse files
committed
Don't use white color for test titles
As it is invisble on light terminal themes. Fixes #1884
1 parent 3ac2a8f commit 08f7ab4

12 files changed

+47
-34
lines changed

lib/reporters/colors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const chalk = require('../chalk').get();
33

44
module.exports = {
55
log: chalk.gray,
6-
title: chalk.bold.white,
6+
title: chalk.bold,
77
error: chalk.red,
88
skip: chalk.yellow,
99
todo: chalk.blue,

test/reporters/mini.failfast.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[?25h
1111
1 test failed
1212

13-
a › fails
13+
a › fails
1414

1515
~/test/fixture/report/failfast/a.js:3
1616

test/reporters/mini.failfast2.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[?25h
1111
1 test failed
1212

13-
a › fails
13+
a › fails
1414

1515
~/test/fixture/report/failfast2/a.js:3
1616

test/reporters/mini.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ const run = (type, sanitizers = []) => t => {
3232
tty.end();
3333
return tty.asBuffer();
3434
})
35-
.then(buffer => report.assert(t, logFile, buffer, {stripStdIO: true, alsoStripSeparator: false}))
35+
.then(buffer => {
36+
// Uncomment this to update the fixtures
37+
// TODO: When we switch to using AVA for testing, we should use snapshot testing for this
38+
// require('fs').writeFileSync(logFile, buffer);
39+
report.assert(t, logFile, buffer, {stripStdIO: true, alsoStripSeparator: false});
40+
})
3641
.catch(t.threw);
3742
};
3843

test/reporters/mini.regular.log

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ stderr
120120

121121
test › known failure
122122

123-
test › fails
123+
test › fails
124124

125125
~/test/fixture/report/regular/test.js:12
126126

@@ -132,14 +132,14 @@ stderr
132132

133133

134134

135-
test › no longer failing
135+
test › no longer failing
136136

137137

138138
Error: Test was expected to fail, but succeeded, you should stop marking the test as failing
139139

140140

141141

142-
test › logs
142+
test › logs
143143
ℹ hello
144144
ℹ world
145145

@@ -153,7 +153,7 @@ stderr
153153

154154

155155

156-
test › formatted
156+
test › formatted
157157

158158
~/test/fixture/report/regular/test.js:25
159159

@@ -168,7 +168,7 @@ stderr
168168

169169

170170

171-
test › power-assert
171+
test › power-assert
172172

173173
~/test/fixture/report/regular/test.js:30
174174

@@ -185,7 +185,7 @@ stderr
185185

186186

187187

188-
test › bad throws
188+
test › bad throws
189189

190190
~/test/fixture/report/regular/test.js:37
191191

@@ -214,7 +214,7 @@ stderr
214214

215215

216216

217-
test › bad notThrows
217+
test › bad notThrows
218218

219219
~/test/fixture/report/regular/test.js:44
220220

@@ -243,7 +243,7 @@ stderr
243243

244244

245245

246-
test › implementation throws non-error
246+
test › implementation throws non-error
247247

248248

249249
Error thrown in test:
@@ -252,7 +252,7 @@ stderr
252252

253253

254254

255-
Uncaught exception in test/fixture/report/regular/bad-test-chain.js
255+
Uncaught exception in test/fixture/report/regular/bad-test-chain.js
256256

257257
~/test/fixture/report/regular/bad-test-chain.js:3
258258

@@ -264,7 +264,7 @@ stderr
264264

265265

266266

267-
Uncaught exception in test/fixture/report/regular/uncaught-exception.js
267+
Uncaught exception in test/fixture/report/regular/uncaught-exception.js
268268

269269
~/test/fixture/report/regular/uncaught-exception.js:5
270270

@@ -276,7 +276,7 @@ stderr
276276

277277

278278

279-
Unhandled rejection in test/fixture/report/regular/unhandled-rejection.js
279+
Unhandled rejection in test/fixture/report/regular/unhandled-rejection.js
280280

281281
~/test/fixture/report/regular/unhandled-rejection.js:4
282282

@@ -288,7 +288,7 @@ stderr
288288

289289

290290

291-
Unhandled rejection in test/fixture/report/regular/unhandled-rejection.js
291+
Unhandled rejection in test/fixture/report/regular/unhandled-rejection.js
292292

293293
null
294294

test/reporters/mini.typescript.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[?25h
77
1 uncaught exception
88

9-
Uncaught exception in test/fixture/report/typescript/build-error.ts
9+
Uncaught exception in test/fixture/report/typescript/build-error.ts
1010

1111
build-error.ts(1,1): error TS2304: Cannot find name 'trigger'.
1212
build-error.ts(2,1): error TS2304: Cannot find name 'lets'.

test/reporters/tap.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ const run = (type, sanitizers = []) => t => {
2626
tty.end();
2727
return tty.asBuffer();
2828
})
29-
.then(buffer => report.assert(t, logFile, buffer, {stripStdIO: true, alsoStripSeparator: true}))
29+
.then(buffer => {
30+
// Uncomment this to update the fixtures
31+
// require('fs').writeFileSync(logFile, buffer);
32+
report.assert(t, logFile, buffer, {stripStdIO: true, alsoStripSeparator: true});
33+
})
3034
.catch(t.threw);
3135
};
3236

test/reporters/verbose.failfast.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
1 test failed
77

8-
a › fails
8+
a › fails
99

1010
~/test/fixture/report/failfast/a.js:3
1111

test/reporters/verbose.failfast2.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
1 test failed
77

8-
a › fails
8+
a › fails
99

1010
~/test/fixture/report/failfast2/a.js:3
1111

test/reporters/verbose.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ const run = (type, sanitizers = []) => t => {
2727
tty.end();
2828
return tty.asBuffer();
2929
})
30-
.then(buffer => report.assert(t, logFile, buffer, {stripStdIO: true, alsoStripSeparator: true}))
30+
.then(buffer => {
31+
// Uncomment this to update the fixtures
32+
// require('fs').writeFileSync(logFile, buffer);
33+
report.assert(t, logFile, buffer, {stripStdIO: true, alsoStripSeparator: true});
34+
})
3135
.catch(t.threw);
3236
};
3337

test/reporters/verbose.regular.log

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
---tty-stream-chunk-separator
3-
Uncaught exception in test/fixture/report/regular/bad-test-chain.js
3+
Uncaught exception in test/fixture/report/regular/bad-test-chain.js
44

55
~/test/fixture/report/regular/bad-test-chain.js:3
66

@@ -18,7 +18,7 @@
1818
✔ unhandled-rejection › unhandled non-error rejection
1919
---tty-stream-chunk-separator
2020

21-
Unhandled rejection in test/fixture/report/regular/unhandled-rejection.js
21+
Unhandled rejection in test/fixture/report/regular/unhandled-rejection.js
2222

2323
~/test/fixture/report/regular/unhandled-rejection.js:4
2424

@@ -29,15 +29,15 @@
2929
Error: Can't catch me
3030

3131
---tty-stream-chunk-separator
32-
Unhandled rejection in test/fixture/report/regular/unhandled-rejection.js
32+
Unhandled rejection in test/fixture/report/regular/unhandled-rejection.js
3333

3434
null
3535

3636
---tty-stream-chunk-separator
3737
✔ uncaught-exception › passes
3838
---tty-stream-chunk-separator
3939

40-
Uncaught exception in test/fixture/report/regular/uncaught-exception.js
40+
Uncaught exception in test/fixture/report/regular/uncaught-exception.js
4141

4242
~/test/fixture/report/regular/uncaught-exception.js:5
4343

@@ -92,7 +92,7 @@ stderr
9292

9393
test › known failure
9494

95-
test › fails
95+
test › fails
9696

9797
~/test/fixture/report/regular/test.js:12
9898

@@ -104,14 +104,14 @@ stderr
104104

105105

106106

107-
test › no longer failing
107+
test › no longer failing
108108

109109

110110
Error: Test was expected to fail, but succeeded, you should stop marking the test as failing
111111

112112

113113

114-
test › logs
114+
test › logs
115115
ℹ hello
116116
ℹ world
117117

@@ -125,7 +125,7 @@ stderr
125125

126126

127127

128-
test › formatted
128+
test › formatted
129129

130130
~/test/fixture/report/regular/test.js:25
131131

@@ -140,7 +140,7 @@ stderr
140140

141141

142142

143-
test › power-assert
143+
test › power-assert
144144

145145
~/test/fixture/report/regular/test.js:30
146146

@@ -157,7 +157,7 @@ stderr
157157

158158

159159

160-
test › bad throws
160+
test › bad throws
161161

162162
~/test/fixture/report/regular/test.js:37
163163

@@ -186,7 +186,7 @@ stderr
186186

187187

188188

189-
test › bad notThrows
189+
test › bad notThrows
190190

191191
~/test/fixture/report/regular/test.js:44
192192

@@ -215,7 +215,7 @@ stderr
215215

216216

217217

218-
test › implementation throws non-error
218+
test › implementation throws non-error
219219

220220

221221
Error thrown in test:

test/reporters/verbose.typescript.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
---tty-stream-chunk-separator
3-
Uncaught exception in test/fixture/report/typescript/build-error.ts
3+
Uncaught exception in test/fixture/report/typescript/build-error.ts
44

55
build-error.ts(1,1): error TS2304: Cannot find name 'trigger'.
66
build-error.ts(2,1): error TS2304: Cannot find name 'lets'.

0 commit comments

Comments
 (0)