Skip to content

Commit eb08505

Browse files
committed
Remove line breaks from subtest names
1 parent d5f9ead commit eb08505

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/base.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ function Base (options) {
2828
this.parent = ownOr(options, 'parent', null)
2929
this.bail = ownOrEnv(options, 'bail', 'TAP_BAIL', true)
3030
this.name = ownOr(options, 'name', '')
31+
if (!this.name)
32+
this.name = ''
33+
else
34+
this.name = this.name.replace(/[\n\r\s\t]/g, ' ')
3135
this.indent = ownOr(options, 'indent', '')
3236
this.silent = !!options.silent
3337
this.buffered = !!options.buffered || !!options.silent

0 commit comments

Comments
 (0)