Debian Codegraph @

lib/reporters/list.js

raw symbols SCIP
1 "use strict";
2
3 /**
4 * @typedef {import('../runner.js')} Runner
5 */
6
7 /**
8 * @module List
9 */
10 /**
11 * Module dependencies.
12 */
13
14 var Basescip-typescript npm mocha 11.7.7 lib/reporters/`list.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/`list.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/`list.js`/constants. = require("../runner"scip-typescript npm mocha 11.7.7 lib/`runner.js`/).constants;
17 var EVENT_RUN_BEGINscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_RUN_BEGIN. = constants.EVENT_RUN_BEGIN;
18 var EVENT_RUN_ENDscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_RUN_END. = constants.EVENT_RUN_END;
19 var EVENT_TEST_BEGINscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_TEST_BEGIN. = constants.EVENT_TEST_BEGIN;
20 var EVENT_TEST_FAILscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_TEST_FAIL. = constants.EVENT_TEST_FAIL;
21 var EVENT_TEST_PASSscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_TEST_PASS. = constants.EVENT_TEST_PASS;
22 var EVENT_TEST_PENDINGscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_TEST_PENDING. = constants.EVENT_TEST_PENDING;
23 var colorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/color. = Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..color;
24 var cursorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/cursor. = Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..cursor;
25
26 /**
27 * Expose `List`.
28 */
29
30 exportsscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/ = module.exports = Listscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().;
31
32 /**
33 * Constructs a new `List` reporter instance.
34 *
35 * @public
36 * @class
37 * @memberof Mocha.reporters
38 * @extends Mocha.reporters.Base
39 * @param {Runner} runner - Instance triggers reporter actions.
40 * @param {Object} [options] - runner options
41 */
42 function Listscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(runnerscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(runner), optionsscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(options)) {
43 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/`list.js`/List().(runner), optionsscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(options));
44
45 var self = this;
46 var n = 0;
47
48 runnerscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(runner).on(EVENT_RUN_BEGINscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_RUN_BEGIN., function () {
49 Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..consoleLog();
50 });
51
52 runnerscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(runner).on(EVENT_TEST_BEGINscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_TEST_BEGIN., function (test) {
53 process.stdout.write(colorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/color.("pass", " " + test.fullTitle() + ": "));
54 });
55
56 runnerscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(runner).on(EVENT_TEST_PENDINGscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_TEST_PENDING., function (test) {
57 var fmt = colorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/color.("checkmark", " -") + colorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/color.("pending", " %s");
58 Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..consoleLog(fmt, test.fullTitle());
59 });
60
61 runnerscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(runner).on(EVENT_TEST_PASSscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_TEST_PASS., function (test) {
62 var fmt =
63 colorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/color.("checkmark", " " + Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..symbols.okscip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/ok0:) +
64 colorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/color.("pass", " %s: ") +
65 colorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/color.(test.speed, "%dms");
66 cursorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/cursor..CRscip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/CR0:();
67 Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..consoleLog(fmt, test.fullTitle(), test.duration);
68 });
69
70 runnerscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(runner).on(EVENT_TEST_FAILscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_TEST_FAIL., function (test) {
71 cursorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/cursor..CRscip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/CR0:();
72 Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base()..consoleLog(colorscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/color.("fail", " %d) %s"), ++n, test.fullTitle());
73 });
74
75 runnerscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List().(runner).once(EVENT_RUN_ENDscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/EVENT_RUN_END., self.epilogue.bind(self));
76 }
77
78 /**
79 * Inherit from `Base.prototype`.
80 */
81 inheritsscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/inherits.(Listscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List()., Basescip-typescript npm mocha 11.7.7 lib/reporters/`base.js`/Base().);
82
83 Listscip-typescript npm mocha 11.7.7 lib/reporters/`list.js`/List()..description = 'like "spec" reporter but flat';