Skip to content

Commit 3c2087a

Browse files
committed
Test name with spaces
1 parent a5fb7ed commit 3c2087a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

test/has spaces.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
var tape = require('../');
2+
var tap = require('tap');
3+
var concat = require('concat-stream');
4+
5+
var stripFullStack = require('./common').stripFullStack;
6+
7+
tap.test('array test', function (tt) {
8+
tt.plan(1);
9+
10+
var test = tape.createHarness({ exit : false });
11+
var tc = function (rows) {
12+
tt.same(stripFullStack(rows.toString('utf8')), [
13+
'TAP version 13',
14+
'# fail',
15+
'not ok 1 this should fail',
16+
' ---',
17+
' operator: fail',
18+
' at: Test.<anonymous> ($TEST/has spaces.js:$LINE:$COL)',
19+
' stack: |-',
20+
' Error: this should fail',
21+
' [... stack stripped ...]',
22+
' at Test.<anonymous> ($TEST/has spaces.js:$LINE:$COL)',
23+
' [... stack stripped ...]',
24+
' ...',
25+
'',
26+
'1..1',
27+
'# tests 1',
28+
'# pass 0',
29+
'# fail 1',
30+
''
31+
].join('\n'));
32+
};
33+
34+
test.createStream().pipe(concat(tc));
35+
36+
test('fail', function (t) {
37+
t.fail('this should fail');
38+
t.end();
39+
});
40+
});

0 commit comments

Comments
 (0)