How to use the tap.pass function in tap

To help you get started, we’ve selected a few tap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alrra / travis-scripts / test / main.js View on Github external
const main = async () => {

    if ( travis.isPullRequest() === true ) {
        process.exit(0);
    }

    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    if ( isTestBranch() ) {
        tap.pass('Job passed');
    } else {
        tap.test('Tests', (t) => {

            testCommitChangesScript(t);
            testUpdateBranchScript(t);

            t.end();

        });
    }

};
github tapjs / t-up / tup.js View on Github external
setTimeout(function () {
      var er
      try {
        process.kill(pid, 'SIGKILL')
      } catch (e) {
        er = e
      }
      if (!er) {
        t.fail('exit delayed, SIGKILL was required')
      } else {
        // very unlikely to get some error other than ESRCH, but if so,
        // go ahead and blow up.
        /* istanbul ignore else */
        if (er.code === 'ESRCH') {
          t.pass('exited successfully with SIGTERM')
        } else {
          throw er
        }
      }
    }, 200)
  }
github isaacs / node-glob / test / global-leakage.js View on Github external
if (require.main === module)
  return require('tap').pass('ok')

var before = Object.keys(global).sort().filter(function (t) {
  return t !== '__coverage__' && t !== '__core-js_shared__'
}).join(':')
var assert = require('assert')
var glob = require('../')

process.on('exit', function() {
  delete global.TAP_Global_Harness
  var after = Object.keys(global).sort().filter(function (t) {
    return t !== '__coverage__' && t !== '__core-js_shared__'
  }).join(':')
  if (after !== before) {
    console.log('- ' + before)
    console.log('+ ' + after)
  }
github nodejs / readable-stream / test / parallel / test-stream3-pause-then-read.js View on Github external
w.on('finish', function () {
    console.error('written', written, totalPushed);
    assert.strictEqual(written, expectEndingData);
    assert.strictEqual(totalPushed, expectTotalData);

    require('tap').pass();
  });
  r.pipe(w);
github nodejs / readable-stream / test / parallel / test-stream2-finish-pipe.js View on Github external
(function () {
  var t = require('tap');

  t.pass('sync run');
})();
github nodejs / readable-stream / test / parallel / test-stream-backpressure.js View on Github external
(function () {
  var t = require('tap');

  t.pass('sync run');
})();
github jkyberneees / fast-proxy / test / transform-body.js View on Github external
const target = http.createServer((req, res) => {
  t.pass('request proxied')
  t.equal(req.method, 'GET')
  res.statusCode = 205
  res.setHeader('Content-Type', 'text/plain')
  res.setHeader('x-my-header', 'hello!')
  res.end('hello world')
})
github isaacs / gatsby-remark-tumble-media / test / cases / common.js View on Github external
}}, t })

const astNoChange = exports.astNoChange = t => ({
  children: { unshift (n) {
    t.notOk(n)
    t.fail('should not add any nodes')
  }},
  t
})

const node = exports.node = (frontmatter, dir) => ({
  frontmatter, parent: { dir }
})

if (require.main === module)
  require('tap').pass('this is fine')