(output)
| 69 | }); |
| 70 | |
| 71 | function getSingleCommandLines(output) { |
| 72 | const outputLines = output.split('\n'); |
| 73 | |
| 74 | // The first line contains the command being run |
| 75 | const command = outputLines.shift(); |
| 76 | |
| 77 | // The last line contains the prompt (asking for some new input) |
| 78 | const prompt = outputLines.pop(); |
| 79 | |
| 80 | // The line before the last one contains the result of the command |
| 81 | const result = outputLines.pop(); |
| 82 | |
| 83 | // The line before that contains the preview of the command |
| 84 | const preview = outputLines.shift(); |
| 85 | |
| 86 | return { |
| 87 | command, |
| 88 | prompt, |
| 89 | result, |
| 90 | preview, |
| 91 | }; |
| 92 | } |
no test coverage detected
searching dependent graphs…