Repositorio del curso CCOM4030 el semestre B91 del proyecto kilometro0

default-messages.js 875B

12345678910111213141516171819202122232425262728293031
  1. var tap = require('tap');
  2. var path = require('path');
  3. var spawn = require('child_process').spawn;
  4. var concat = require('concat-stream');
  5. tap.test('default messages', function (t) {
  6. t.plan(1);
  7. var ps = spawn(process.execPath, [path.join(__dirname, 'messages', 'defaults.js')]);
  8. ps.stdout.pipe(concat(function (rows) {
  9. t.same(rows.toString('utf8'), [
  10. 'TAP version 13',
  11. '# default messages',
  12. 'ok 1 should be truthy',
  13. 'ok 2 should be falsy',
  14. 'ok 3 should be equal',
  15. 'ok 4 should not be equal',
  16. 'ok 5 should be equivalent',
  17. 'ok 6 should be equivalent',
  18. 'ok 7 should be equivalent',
  19. '',
  20. '1..7',
  21. '# tests 7',
  22. '# pass 7',
  23. '',
  24. '# ok'
  25. ].join('\n') + '\n\n');
  26. }));
  27. });