(chalkInstance: chalk.Chalk)
| 148 | |
| 149 | // Simulate comparison lines from printSnapshotAndReceived. |
| 150 | const formatLines = (chalkInstance: chalk.Chalk) => { |
| 151 | const aColor = getSnapshotColorForChalkInstance(chalkInstance); |
| 152 | const bColor = getReceivedColorForChalkInstance(chalkInstance); |
| 153 | const cColor = chalkInstance.dim; |
| 154 | const changeLineTrailingSpaceColor = noColor; |
| 155 | const commonLineTrailingSpaceColor = chalkInstance.bgYellow; |
| 156 | |
| 157 | return [ |
| 158 | aColor(`- delete 1${changeLineTrailingSpaceColor(' ')}`), |
| 159 | cColor(` common 2${commonLineTrailingSpaceColor(' ')}`), |
| 160 | bColor('+ insert 0'), |
| 161 | ].join('\n'); |
| 162 | }; |
| 163 | |
| 164 | const expected0 = '- delete 1 \n common 2 \n+ insert 0'; |
| 165 | const expected1 = |
no test coverage detected