Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

skip.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. var test = require('../');
  2. var ran = 0;
  3. var concat = require('concat-stream');
  4. var tap = require('tap');
  5. tap.test('test SKIP comment', function (assert) {
  6. assert.plan(1);
  7. var verify = function (output) {
  8. assert.equal(output.toString('utf8'), [
  9. 'TAP version 13',
  10. '# SKIP skipped',
  11. '',
  12. '1..0',
  13. '# tests 0',
  14. '# pass 0',
  15. '',
  16. '# ok',
  17. ''
  18. ].join('\n'));
  19. };
  20. var tapeTest = test.createHarness();
  21. tapeTest.createStream().pipe(concat(verify));
  22. tapeTest('skipped', { skip: true }, function (t) {
  23. t.end();
  24. });
  25. });
  26. test('skip this', { skip: true }, function (t) {
  27. t.fail('this should not even run');
  28. ran++;
  29. t.end();
  30. });
  31. test.skip('skip this too', function (t) {
  32. t.fail('this should not even run');
  33. ran++;
  34. t.end();
  35. });
  36. test('skip subtest', function (t) {
  37. ran++;
  38. t.test('skip this', { skip: true }, function (t) {
  39. t.fail('this should not even run');
  40. t.end();
  41. });
  42. t.end();
  43. });
  44. // vim: set softtabstop=4 shiftwidth=4: