Skip to content

Commit 44d1f6f

Browse files
committed
update devDpendencies to latest: tap (v7) and tap-parser (v2) fixes #312
1 parent 5f89509 commit 44d1f6f

10 files changed

+53
-58
lines changed

readme.markdown

+9-14
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Please note that all modules loaded using the `-r` flag will run *before* any te
8888

8989
tape maintains a fairly minimal core. Additional features are usually added by using another module alongside tape.
9090

91-
## reporters for humans
91+
## pretty reporters
9292

9393
The default TAP output is good for machines and humans that are robots.
9494

@@ -98,30 +98,26 @@ that will output something pretty if you pipe TAP into them:
9898
- https://github.com/scottcorgan/tap-spec
9999
- https://github.com/scottcorgan/tap-dot
100100
- https://github.com/substack/faucet
101+
- https://github.com/juliangruber/tap-bail
101102
- https://github.com/kirbysayshi/tap-browser-color
103+
- https://github.com/gummesson/tap-json
102104
- https://github.com/gummesson/tap-min
103105
- https://github.com/calvinmetcalf/tap-nyan
104-
- https://github.com/clux/tap-pessimist
106+
- https://www.npmjs.org/package/tap-pessimist
105107
- https://github.com/toolness/tap-prettify
106108
- https://github.com/shuhei/colortape
109+
- https://github.com/aghassemi/tap-xunit
107110
- https://github.com/namuol/tap-difflet
111+
- https://github.com/gritzko/tape-dom
108112
- https://github.com/axross/tap-diff
109113
- https://github.com/axross/tap-notify
110114
- https://github.com/zoubin/tap-summary
111-
112-
You use these reporters by piping the tape output into them. For example,
113-
try `node test/index.js | tap-spec`.
114-
115-
## reporters for other file formats
116-
117-
- https://github.com/gummesson/tap-json
118-
- https://github.com/aghassemi/tap-xunit
119-
- https://github.com/gritzko/tape-dom
120115
- https://github.com/Hypercubed/tap-markdown
121116

122-
## failing assertions
117+
To use them, try `node test/index.js | tap-spec` or pipe it into one
118+
of the modules of your choice!
123119

124-
If any assertions fail, tape will continue. To terminate on the first failure, see [tap-bail](https://github.com/juliangruber/tap-bail).
120+
## uncaught exceptions
125121

126122
By default, uncaught exceptions in your tests will not be intercepted, and will cause tape to crash. If you find this behavior undesirable, use [tape-catch](https://github.com/michaelrhodes/tape-catch) to report any exceptions as TAP errors.
127123

@@ -130,7 +126,6 @@ By default, uncaught exceptions in your tests will not be intercepted, and will
130126
- CoffeeScript support with https://www.npmjs.com/package/coffeetape
131127
- Promise support with https://www.npmjs.com/package/blue-tape
132128
- ES6 support with https://www.npmjs.com/package/babel-tape-runner
133-
- Inclue time information with https://github.com/diasdavid/timed-tape
134129

135130
# methods
136131

test/array.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ var concat = require('concat-stream');
55

66
tap.test('array test', function (tt) {
77
tt.plan(1);
8-
8+
99
var test = tape.createHarness();
10-
10+
1111
test.createStream().pipe(concat(function (rows) {
1212
tt.same(rows.toString('utf8'), [
1313
'TAP version 13',
@@ -25,29 +25,29 @@ tap.test('array test', function (tt) {
2525
'# ok'
2626
].join('\n') + '\n');
2727
}));
28-
28+
2929
test('array', function (t) {
3030
t.plan(5);
31-
31+
3232
var src = '(' + function () {
3333
var xs = [ 1, 2, [ 3, 4 ] ];
3434
var ys = [ 5, 6 ];
3535
g([ xs, ys ]);
3636
} + ')()';
37-
37+
3838
var output = falafel(src, function (node) {
3939
if (node.type === 'ArrayExpression') {
4040
node.update('fn(' + node.source() + ')');
4141
}
4242
});
43-
43+
4444
var arrays = [
4545
[ 3, 4 ],
4646
[ 1, 2, [ 3, 4 ] ],
4747
[ 5, 6 ],
4848
[ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
4949
];
50-
50+
5151
Function(['fn','g'], output)(
5252
function (xs) {
5353
t.same(arrays.shift(), xs);

test/default-messages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tap.test('default messages', function (t) {
77
t.plan(1);
88

99
var ps = spawn(process.execPath, [path.join(__dirname, 'messages', 'defaults.js')]);
10-
10+
1111
ps.stdout.pipe(concat(function (rows) {
1212

1313
t.same(rows.toString('utf8'), [

test/end-as-callback.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var concat = require('concat-stream');
44

55
tap.test("tape assert.end as callback", function (tt) {
66
var test = tape.createHarness({ exit: false })
7-
7+
88
test.createStream().pipe(concat(function (rows) {
99
tt.equal(rows.toString('utf8'), [
1010
'TAP version 13',

test/fail.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var concat = require('concat-stream');
55

66
tap.test('array test', function (tt) {
77
tt.plan(1);
8-
8+
99
var test = tape.createHarness({ exit : false });
1010
var tc = function (rows) {
1111
tt.same(rows.toString('utf8'), [
@@ -29,31 +29,31 @@ tap.test('array test', function (tt) {
2929
''
3030
].join('\n'));
3131
};
32-
32+
3333
test.createStream().pipe(concat(tc));
34-
34+
3535
test('array', function (t) {
3636
t.plan(5);
37-
37+
3838
var src = '(' + function () {
3939
var xs = [ 1, 2, [ 3, 4 ] ];
4040
var ys = [ 5, 6 ];
4141
g([ xs, ys ]);
4242
} + ')()';
43-
43+
4444
var output = falafel(src, function (node) {
4545
if (node.type === 'ArrayExpression') {
4646
node.update('fn(' + node.source() + ')');
4747
}
4848
});
49-
49+
5050
var arrays = [
5151
[ 3, 4 ],
5252
[ 1, 2, [ 3, 4 ] ],
5353
[ 5, 6 ],
5454
[ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
5555
];
56-
56+
5757
Function(['fn','g'], output)(
5858
function (xs) {
5959
t.same(arrays.shift(), xs);

test/nested-sync-noplan-noend.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ tap.test('nested sync test without plan or end', function (tt) {
2727

2828
test('nested without plan or end', function(t) {
2929
t.test('first', function(q) {
30-
setTimeout(function first() {
30+
setTimeout(function first() {
3131
q.ok(true);
32-
q.end()
32+
q.end()
3333
}, 10);
3434
});
3535
t.test('second', function(q) {
36-
setTimeout(function second() {
36+
setTimeout(function second() {
3737
q.ok(true);
38-
q.end()
38+
q.end()
3939
}, 10);
4040
});
4141
});

test/nested.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var concat = require('concat-stream');
55

66
tap.test('array test', function (tt) {
77
tt.plan(1);
8-
8+
99
var test = tape.createHarness();
1010
var tc = function (rows) {
1111
tt.same(rows.toString('utf8'), [
@@ -29,40 +29,40 @@ tap.test('array test', function (tt) {
2929
'# ok'
3030
].join('\n') + '\n');
3131
};
32-
32+
3333
test.createStream().pipe(concat(tc));
34-
34+
3535
test('nested array test', function (t) {
3636
t.plan(6);
37-
37+
3838
var src = '(' + function () {
3939
var xs = [ 1, 2, [ 3, 4 ] ];
4040
var ys = [ 5, 6 ];
4141
g([ xs, ys ]);
4242
} + ')()';
43-
43+
4444
var output = falafel(src, function (node) {
4545
if (node.type === 'ArrayExpression') {
4646
node.update('fn(' + node.source() + ')');
4747
}
4848
});
49-
49+
5050
t.test('inside test', function (q) {
5151
q.plan(2);
5252
q.ok(true);
53-
53+
5454
setTimeout(function () {
5555
q.ok(true);
5656
}, 100);
5757
});
58-
58+
5959
var arrays = [
6060
[ 3, 4 ],
6161
[ 1, 2, [ 3, 4 ] ],
6262
[ 5, 6 ],
6363
[ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
6464
];
65-
65+
6666
Function(['fn','g'], output)(
6767
function (xs) {
6868
t.same(arrays.shift(), xs);

test/require.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var concat = require('concat-stream');
44

55
tap.test('requiring a single module', function (t) {
66
t.plan(2);
7-
7+
88
var tc = function (rows) {
99
t.same(rows.toString('utf8'), [
1010
'TAP version 13',
@@ -21,7 +21,7 @@ tap.test('requiring a single module', function (t) {
2121
'# ok'
2222
].join('\n') + '\n\n');
2323
};
24-
24+
2525
var ps = tape('-r ./require/a require/test-a.js');
2626
ps.stdout.pipe(concat(tc));
2727
ps.on('exit', function (code) {
@@ -31,7 +31,7 @@ tap.test('requiring a single module', function (t) {
3131

3232
tap.test('requiring multiple modules', function (t) {
3333
t.plan(2);
34-
34+
3535
var tc = function (rows) {
3636
t.same(rows.toString('utf8'), [
3737
'TAP version 13',
@@ -53,7 +53,7 @@ tap.test('requiring multiple modules', function (t) {
5353
'# ok'
5454
].join('\n') + '\n\n');
5555
};
56-
56+
5757
var ps = tape('-r ./require/a -r ./require/b require/test-a.js require/test-b.js');
5858
ps.stdout.pipe(concat(tc));
5959
ps.on('exit', function (code) {
@@ -66,4 +66,4 @@ function tape(args) {
6666
var bin = __dirname + '/../bin/tape'
6767

6868
return proc.spawn(bin, args.split(' '), { cwd: __dirname })
69-
}
69+
}

test/timeoutAfter.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var concat = require('concat-stream');
44

55
tap.test('timeoutAfter test', function (tt) {
66
tt.plan(1);
7-
7+
88
var test = tape.createHarness();
99
var tc = function (rows) {
1010
tt.same(rows.toString('utf8'), [
@@ -21,9 +21,9 @@ tap.test('timeoutAfter test', function (tt) {
2121
'# fail 1'
2222
].join('\n') + '\n');
2323
};
24-
24+
2525
test.createStream().pipe(concat(tc));
26-
26+
2727
test('timeoutAfter', function (t) {
2828
t.plan(1);
2929
t.timeoutAfter(1);

test/too_many.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var concat = require('concat-stream');
55

66
tap.test('array test', function (tt) {
77
tt.plan(1);
8-
8+
99
var test = tape.createHarness({ exit : false });
1010
var tc = function (rows) {
1111
tt.same(rows.toString('utf8'), [
@@ -29,31 +29,31 @@ tap.test('array test', function (tt) {
2929
'# fail 1'
3030
].join('\n') + '\n');
3131
};
32-
32+
3333
test.createStream().pipe(concat(tc));
34-
34+
3535
test('array', function (t) {
3636
t.plan(3);
37-
37+
3838
var src = '(' + function () {
3939
var xs = [ 1, 2, [ 3, 4 ] ];
4040
var ys = [ 5, 6 ];
4141
g([ xs, ys ]);
4242
} + ')()';
43-
43+
4444
var output = falafel(src, function (node) {
4545
if (node.type === 'ArrayExpression') {
4646
node.update('fn(' + node.source() + ')');
4747
}
4848
});
49-
49+
5050
var arrays = [
5151
[ 3, 4 ],
5252
[ 1, 2, [ 3, 4 ] ],
5353
[ 5, 6 ],
5454
[ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
5555
];
56-
56+
5757
Function(['fn','g'], output)(
5858
function (xs) {
5959
t.same(arrays.shift(), xs);

0 commit comments

Comments
 (0)