UNPKG

airtap

Version:

Run TAP unit tests in 1789+ browsers

24 lines (18 loc) 332 B
'use strict' const kOk = Symbol('kOk') module.exports = class Stats { constructor (ok, pass, fail) { this[kOk] = ok this.pass = pass this.fail = fail } get ok () { return this[kOk] && this.fail === 0 } set ok (value) { this[kOk] = value } get count () { return this.pass + this.fail } }