UNPKG

1.04 kBJavaScriptView Raw
1var tap = require('tap');
2var tape = require('../');
3var concat = require('concat-stream');
4
5var common = require('./common');
6var stripFullStack = common.stripFullStack;
7
8tap.test('tape todo test', function (assert) {
9 var test = tape.createHarness({ exit: false });
10 assert.plan(1);
11
12 test.createStream().pipe(concat(function (body) {
13 assert.equal(
14 stripFullStack(body.toString('utf8')),
15 'TAP version 13\n'
16 + '# TODO failure\n'
17 + 'not ok 1 should be equal # TODO\n'
18 + ' ---\n'
19 + ' operator: equal\n'
20 + ' expected: false\n'
21 + ' actual: true\n'
22 + ' at: Test.<anonymous> ($TEST/todo_single.js:$LINE:$COL)\n'
23 + ' ...\n'
24 + '\n'
25 + '1..1\n'
26 + '# tests 1\n'
27 + '# pass 1\n'
28 + '\n'
29 + '# ok\n'
30 );
31 }));
32
33 test('failure', { todo: true }, function (t) {
34 t.equal(true, false);
35 t.end();
36 });
37});