Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
});
}
};
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)
}
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)
}
w.on('finish', function () {
console.error('written', written, totalPushed);
assert.strictEqual(written, expectEndingData);
assert.strictEqual(totalPushed, expectTotalData);
require('tap').pass();
});
r.pipe(w);
(function () {
var t = require('tap');
t.pass('sync run');
})();
(function () {
var t = require('tap');
t.pass('sync run');
})();
(function () {
var t = require('tap');
t.pass('sync run');
})();
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')
})
(function () {
var t = require('tap');
t.pass('sync run');
})();
}}, 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')