* Convert the step to an array of string tokens.
()
| 393 | * Convert the step to an array of string tokens. |
| 394 | */ |
| 395 | public toStringTokens(): readonly StepStringToken[] { |
| 396 | const { stepLabels, ...config } = this.config; |
| 397 | |
| 398 | const tokens: StepStringToken[] = [ |
| 399 | { kind: "start" }, |
| 400 | { kind: "name", value: this.name }, |
| 401 | { kind: "config", value: config }, |
| 402 | ]; |
| 403 | if (stepLabels !== undefined && stepLabels.length > 0) { |
| 404 | tokens.push({ kind: "aliases", value: stepLabels }); |
| 405 | } |
| 406 | if (this.traversed > 0) { |
| 407 | tokens.push({ kind: "stat", key: "traversed", value: this.traversed }); |
| 408 | } |
| 409 | if (this.emitted > 0) { |
| 410 | tokens.push({ kind: "stat", key: "emitted", value: this.emitted }); |
| 411 | } |
| 412 | tokens.push({ kind: "end" }); |
| 413 | return tokens; |
| 414 | } |
| 415 | |
| 416 | public toString() { |
| 417 | return stringTokensToString(this.toStringTokens()); |
nothing calls this directly
no test coverage detected