| 1 | "use strict"; |
| 2 | |
| 3 | /** |
| 4 | * @typedef {import('../runner.js')} Runner |
| 5 | */ |
| 6 | |
| 7 | /** |
| 8 | * @module Dot |
| 9 | */ |
| 10 | /** |
| 11 | * Module dependencies. |
| 12 | */ |
| 13 | |
| 14 | var Basescip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Base. = require("./base"scip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/); |
| 15 | var inheritsscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/inherits. = require("../utils"scip-typescript npm mocha 11.7.7 lib/`utils.js`/).inherits; |
| 16 | var constantsscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/constants. = require("../runner"scip-typescript npm mocha 11.7.7 lib/`runner.js`/).constants; |
| 17 | var EVENT_TEST_PASSscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_TEST_PASS. = constants.EVENT_TEST_PASS; |
| 18 | var EVENT_TEST_FAILscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_TEST_FAIL. = constants.EVENT_TEST_FAIL; |
| 19 | var EVENT_RUN_BEGINscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_RUN_BEGIN. = constants.EVENT_RUN_BEGIN; |
| 20 | var EVENT_TEST_PENDINGscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_TEST_PENDING. = constants.EVENT_TEST_PENDING; |
| 21 | var EVENT_RUN_ENDscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_RUN_END. = constants.EVENT_RUN_END; |
| 22 | |
| 23 | /** |
| 24 | * Expose `Dot`. |
| 25 | */ |
| 26 | |
| 27 | exportsscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/ = module.exports = Dotscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().; |
| 28 | |
| 29 | /** |
| 30 | * Constructs a new `Dot` reporter instance. |
| 31 | * |
| 32 | * @public |
| 33 | * @class |
| 34 | * @memberof Mocha.reporters |
| 35 | * @extends Mocha.reporters.Base |
| 36 | * @param {Runner} runner - Instance triggers reporter actions. |
| 37 | * @param {Object} [options] - runner options |
| 38 | */ |
| 39 | function Dotscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(runnerscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(runner), optionsscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(options)) { |
| 40 | Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..callscip-typescript npm typescript 5.9.3 lib/`lib.es5.d.ts`/Function#call().(this, runnerscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(runner), optionsscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(options)); |
| 41 | |
| 42 | var self = this; |
| 43 | var width = (Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..window.widthscip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/width0: * 0.75) | 0; |
| 44 | var n = -1; |
| 45 | |
| 46 | runnerscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(runner).on(EVENT_RUN_BEGINscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_RUN_BEGIN., function () { |
| 47 | process.stdout.write("\n"); |
| 48 | }); |
| 49 | |
| 50 | runnerscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(runner).on(EVENT_TEST_PENDINGscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_TEST_PENDING., function () { |
| 51 | if (++n % width === 0) { |
| 52 | process.stdout.write("\n "); |
| 53 | } |
| 54 | process.stdout.write(Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..color("pending", Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..symbols.commascip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/comma0:)); |
| 55 | }); |
| 56 | |
| 57 | runnerscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(runner).on(EVENT_TEST_PASSscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_TEST_PASS., function (test) { |
| 58 | if (++n % width === 0) { |
| 59 | process.stdout.write("\n "); |
| 60 | } |
| 61 | if (test.speed === "slow") { |
| 62 | process.stdout.write(Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..color("bright yellow", Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..symbols.dotscip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/dot0:)); |
| 63 | } else { |
| 64 | process.stdout.write(Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..color(test.speed, Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..symbols.dotscip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/dot0:)); |
| 65 | } |
| 66 | }); |
| 67 | |
| 68 | runnerscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(runner).on(EVENT_TEST_FAILscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_TEST_FAIL., function () { |
| 69 | if (++n % width === 0) { |
| 70 | process.stdout.write("\n "); |
| 71 | } |
| 72 | process.stdout.write(Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..color("fail", Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..symbols.bangscip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/bang0:)); |
| 73 | }); |
| 74 | |
| 75 | runnerscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot().(runner).once(EVENT_RUN_ENDscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/EVENT_RUN_END., function () { |
| 76 | process.stdout.write("\n"); |
| 77 | self.epilogue(); |
| 78 | }); |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Inherit from `Base.prototype`. |
| 83 | */ |
| 84 | inheritsscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/inherits.(Dotscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot()., Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base().); |
| 85 | |
| 86 | Dotscip-typescript npm mocha 11.7.7 lib/reporters/`dot.js`/Dot()..description = "dot matrix representation"; |