UNPKG

jupyter-js-auto-test

Version:

Auto scan files under the directory and run test in them

15 lines (13 loc) 332 B
const chalk = require('chalk') module.exports = { foo } function foo(callback) { if (1 + 1 === 2) { console.log(chalk.green('Test foo passed')) callback(true) } else { console.log(chalk.red('Test foo failed due to '), 'impossible') callback(false, 'error message') } }