/
githubmirror
/
pm2
Обзор
Документация
Войти
/
githubmirror
/
pm2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/helpers/plan.js
35 строк
516 B
Peter Dave Hello
fix: remove trailing spaces
02 июл 2018, 15:34
02 июл 2018, 15:34
5c11598
Код
Авторство
О чём код?
var assert = require('assert'); /** * Description * @method Plan * @param {} count * @param {} done * @return */ function Plan(count, done) { this.done = done; this.count = count; } /** * Description * @method ok * @param {} expression * @return */ Plan.prototype.ok = function(expression) { assert(expression); if (this.count === 0) { assert(false, 'Too many assertions called'); } else { this.count--; } if (this.count === 0) { this.done(); } }; module.exports = Plan;