* Creates a regex that matches the expected shape of the `debugName` while * tolerating differences in output between ngtsc and ngp.
(expected: string)
| 39 | * tolerating differences in output between ngtsc and ngp. |
| 40 | */ |
| 41 | function looseMatch(expected: string): RegExp { |
| 42 | const pattern = expected |
| 43 | .replace(/[.*+?^${}()|[\]\\/]/g, '\\$&') |
| 44 | .replace(/\\\/\\\* @ts-ignore \\\*\\\/ /g, '(?:\\/\\* @ts-ignore \\*\\/ )?') |
| 45 | .replace(/\\\(\s*/g, '\\(\\s*') |
| 46 | .replace(/\s*\\\)/g, '\\s*\\)') |
| 47 | .replace(/,?\s*\\\}/g, ',?\\s*\\}'); |
| 48 | return new RegExp(pattern); |
| 49 | } |
| 50 | |
| 51 | runInEachFileSystem(() => { |
| 52 | describe('Debug Info Typescript tranformation', () => { |
no test coverage detected