todo_single.js 832 B

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