MCPcopy Index your code
hub / github.com/nodejs/node / #formatInterruptedTests

Method #formatInterruptedTests

lib/internal/test_runner/reporter/spec.js:113–133  ·  view source on GitHub ↗
(tests)

Source from the content-addressed store, hash-verified

111 }
112 }
113 #formatInterruptedTests(tests) {
114 if (tests.length === 0) {
115 return '';
116 }
117
118 const results = [
119 `\n${colors.yellow}Interrupted while running:${colors.white}\n`,
120 ];
121
122 for (let i = 0; i < tests.length; i++) {
123 const test = tests[i];
124 let msg = `${indent(test.nesting)}${reporterUnicodeSymbolMap['warning:alert']}${test.name}`;
125 if (test.file) {
126 const relPath = relative(this.#cwd, test.file);
127 msg += ` ${colors.gray}(${relPath}:${test.line}:${test.column})${colors.white}`;
128 }
129 ArrayPrototypePush(results, msg);
130 }
131
132 return ArrayPrototypeJoin(results, '\n') + '\n';
133 }
134 _transform({ type, data }, encoding, callback) {
135 callback(null, this.#handleEvent({ __proto__: null, type, data }));
136 }

Callers 1

#handleEventMethod · 0.95

Calls 2

relativeFunction · 0.85
indentFunction · 0.70

Tested by

no test coverage detected