MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / flush

Method flush

reporter.cjs:184–208  ·  view source on GitHub ↗
(reset)

Source from the content-addressed store, hash-verified

182 }
183
184 flush(reset) {
185 let didLog = false;
186 if (this._lastPrefix != null) {
187 if (this._prefixCount === 1 && this._lastPrefixHeader == null) {
188 this.log(escapeColor(this._lastLine));
189 didLog = true;
190 } else if (this._prefixCount > 0) {
191 if (this._lastPrefixHeader !== this._lastPrefix) {
192 this.log(`<cyan>${ escapeColor(this._lastPrefix) }:`);
193 this._lastPrefixHeader = this._lastPrefix;
194 }
195 this.log(` - ${ this._prefixCount } tests passed (prefix coalesced)`);
196 didLog = true;
197 }
198 }
199
200 if (reset) {
201 this._lastPrefixHeader = null;
202 this._lastPrefix = null;
203 }
204
205 this._prefixCount = 0;
206
207 return didLog;
208 }
209
210 increaseIndent() { this._indents++; }
211

Callers 2

constructorMethod · 0.95
addPassMethod · 0.95

Calls 2

logMethod · 0.95
escapeColorFunction · 0.70

Tested by

no test coverage detected