Skip to content

Commit c4025c1

Browse files
committed
update tests to reflect double-blank-lines in Tap output as discussed in PR comment: tape-testing#314 (comment)
1 parent 82ba4d4 commit c4025c1

File tree

10 files changed

+27
-46
lines changed

10 files changed

+27
-46
lines changed

test/array.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ tap.test('array test', function (tt) {
2222
'# tests 5',
2323
'# pass 5',
2424
'',
25-
'# ok',
26-
''
27-
].join('\n'));
25+
'# ok'
26+
].join('\n') + '\n');
2827
}));
2928

3029
test('array', function (t) {

test/default-messages.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ tap.test('default messages', function (t) {
2525
'# tests 7',
2626
'# pass 7',
2727
'',
28-
'# ok',
29-
'',
30-
''
31-
].join('\n'));
28+
'# ok'
29+
].join('\n') + '\n\n');
3230
}));
3331
});

test/end-as-callback.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ tap.test("tape assert.end as callback", function (tt) {
2020
'1..5',
2121
'# tests 5',
2222
'# pass 4',
23-
'# fail 1',
24-
''
25-
].join('\n'));
23+
'# fail 1'
24+
].join('\n') + '\n');
2625
tt.end()
2726
}));
2827

test/exit.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ tap.test('exit fail', function (t) {
5555
'1..5',
5656
'# tests 5',
5757
'# pass 4',
58-
'# fail 1',
59-
'',
60-
''
61-
].join('\n'));
58+
'# fail 1'
59+
].join('\n') + '\n\n');
6260
};
6361

6462
var ps = spawn(process.execPath,
@@ -91,10 +89,8 @@ tap.test('too few exit', function (t) {
9189
'1..6',
9290
'# tests 6',
9391
'# pass 5',
94-
'# fail 1',
95-
'',
96-
''
97-
].join('\n'));
92+
'# fail 1'
93+
].join('\n') + '\n\n');
9894
};
9995

10096
var ps = spawn(process.execPath, [ __dirname + '/exit/too_few.js' ]);
@@ -124,10 +120,8 @@ tap.test('more planned in a second test', function (t) {
124120
'1..3',
125121
'# tests 3',
126122
'# pass 2',
127-
'# fail 1',
128-
'',
129-
'',
130-
].join('\n'));
123+
'# fail 1'
124+
].join('\n') + '\n\n');
131125
};
132126

133127
var ps = spawn(process.execPath, [ __dirname + '/exit/second.js' ]);

test/nested-sync-noplan-noend.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ tap.test('nested sync test without plan or end', function (tt) {
1919
'# tests 2',
2020
'# pass 2',
2121
'',
22-
'# ok',
23-
''
24-
].join('\n'));
22+
'# ok'
23+
].join('\n') + '\n');
2524
};
2625

2726
test.createStream().pipe(concat(tc));

test/nested.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ tap.test('array test', function (tt) {
2626
'# tests 8',
2727
'# pass 8',
2828
'',
29-
'# ok',
30-
''
31-
].join('\n'));
29+
'# ok'
30+
].join('\n') + '\n');
3231
};
3332

3433
test.createStream().pipe(concat(tc));

test/only.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ tap.test('tape only test', function (tt) {
1616
'# tests 1',
1717
'# pass 1',
1818
'',
19-
'# ok',
20-
''
21-
].join('\n'));
19+
'# ok'
20+
].join('\n') + '\n');
2221
tt.deepEqual(ran, [ 3 ]);
2322

2423
tt.end()

test/require.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ tap.test('requiring a single module', function (t) {
1818
'# tests 3',
1919
'# pass 3',
2020
'',
21-
'# ok',
22-
'',
23-
''
24-
].join('\n'));
21+
'# ok'
22+
].join('\n') + '\n\n');
2523
};
2624

2725
var ps = tape('-r ./require/a require/test-a.js');
@@ -35,7 +33,7 @@ tap.test('requiring multiple modules', function (t) {
3533
t.plan(2);
3634

3735
var tc = function (rows) {
38-
t.same(rows.toString('utf8').split('\n'), [
36+
t.same(rows.toString('utf8'), [
3937
'TAP version 13',
4038
'# module-a',
4139
'ok 1 loaded module a',
@@ -52,10 +50,8 @@ tap.test('requiring multiple modules', function (t) {
5250
'# tests 6',
5351
'# pass 6',
5452
'',
55-
'# ok',
56-
'',
57-
''
58-
]);
53+
'# ok'
54+
].join('\n') + '\n\n');
5955
};
6056

6157
var ps = tape('-r ./require/a -r ./require/b require/test-a.js require/test-b.js');

test/timeoutAfter.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ tap.test('timeoutAfter test', function (tt) {
1818
'1..1',
1919
'# tests 1',
2020
'# pass 0',
21-
'# fail 1',
22-
''
23-
].join('\n'));
21+
'# fail 1'
22+
].join('\n') + '\n');
2423
};
2524

2625
test.createStream().pipe(concat(tc));

test/too_many.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ tap.test('array test', function (tt) {
2626
'1..6',
2727
'# tests 6',
2828
'# pass 5',
29-
'# fail 1',
30-
''
31-
].join('\n'));
29+
'# fail 1'
30+
].join('\n') + '\n');
3231
};
3332

3433
test.createStream().pipe(concat(tc));

0 commit comments

Comments
 (0)