Repositorio del curso CCOM4030 el semestre B91 del proyecto kilometro0

123456789101112131415161718192021222324252627282930313233343536
  1. var tape = require('../');
  2. var tap = require('tap');
  3. var concat = require('concat-stream');
  4. var stripFullStack = require('./common').stripFullStack;
  5. tap.test('timeoutAfter test', function (tt) {
  6. tt.plan(1);
  7. var test = tape.createHarness();
  8. var tc = function (rows) {
  9. tt.same(stripFullStack(rows.toString('utf8')), [
  10. 'TAP version 13',
  11. '# timeoutAfter',
  12. 'not ok 1 test timed out after 1ms',
  13. ' ---',
  14. ' operator: fail',
  15. ' stack: |-',
  16. ' Error: test timed out after 1ms',
  17. ' [... stack stripped ...]',
  18. ' ...',
  19. '',
  20. '1..1',
  21. '# tests 1',
  22. '# pass 0',
  23. '# fail 1'
  24. ].join('\n') + '\n');
  25. };
  26. test.createStream().pipe(concat(tc));
  27. test('timeoutAfter', function (t) {
  28. t.plan(1);
  29. t.timeoutAfter(1);
  30. });
  31. });