Repositorio del curso CCOM4030 el semestre B91 del proyecto kilometro0

todo_explanation.js 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. var tap = require('tap');
  2. var tape = require('../');
  3. var concat = require('concat-stream');
  4. var common = require('./common');
  5. var stripFullStack = common.stripFullStack;
  6. tap.test('tape todo test', { todo: process.versions.node.match(/0\.8\.\d+/) ? 'Fails on node 0.8': false }, function (assert) {
  7. var test = tape.createHarness({ exit: false });
  8. assert.plan(1);
  9. test.createStream().pipe(concat(function (body) {
  10. assert.equal(
  11. stripFullStack(body.toString('utf8')), [
  12. 'TAP version 13',
  13. '# success',
  14. 'ok 1 this test runs',
  15. '# TODO incomplete test1',
  16. 'not ok 2 check output # TODO',
  17. ' ---',
  18. ' operator: equal',
  19. ' expected: false',
  20. ' actual: true',
  21. ' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
  22. ' ...',
  23. 'not ok 3 check vars output # TODO name conflict',
  24. ' ---',
  25. ' operator: equal',
  26. ' expected: 0',
  27. ' actual: 1',
  28. ' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
  29. ' ...',
  30. '# incomplete test2',
  31. 'not ok 4 run openssl # TODO installer needs fix',
  32. ' ---',
  33. ' operator: fail',
  34. ' at: Test.<anonymous> ($TEST/todo_explanation.js:$LINE:$COL)',
  35. ' ...',
  36. '# TODO passing test',
  37. '',
  38. '1..4',
  39. '# tests 4',
  40. '# pass 4',
  41. '',
  42. '# ok',
  43. ''
  44. ].join('\n')
  45. );
  46. }));
  47. test('success', function (t) {
  48. t.equal(true, true, 'this test runs');
  49. t.end();
  50. });
  51. test('incomplete test1', { todo: true }, function (t) {
  52. t.equal(true, false, 'check output');
  53. t.equal(1, 0, 'check vars output', { todo: 'name conflict' });
  54. t.end();
  55. });
  56. test('incomplete test2', function (t) {
  57. t.fail('run openssl', { todo: 'installer needs fix' });
  58. t.end();
  59. });
  60. test('passing test', { todo: 'yet incomplete' }, function (t) {
  61. t.end();
  62. });
  63. });