| 1498 | }; |
| 1499 | |
| 1500 | function actionChangesMatch( |
| 1501 | actionChanges: ActionChanges, |
| 1502 | description: string, |
| 1503 | substitutions: Array<readonly [string, string]>, |
| 1504 | ) { |
| 1505 | expect(Object.keys(actionChanges)).toContain(description); |
| 1506 | for (const substitution of substitutions) { |
| 1507 | expect(actionChanges[description]).toContain([substitution[0], substitution[1]]); |
| 1508 | } |
| 1509 | } |
| 1510 | |
| 1511 | // Returns the ActionChanges for all changes in the given code actions, collapsing whitespace into a |
| 1512 | // single space and trimming at the ends. |