(entry: string, depIdFragment: string)
| 23 | } |
| 24 | |
| 25 | async function getDepJs(entry: string, depIdFragment: string) { |
| 26 | const res = await page.request.get(new URL(entry, page.url()).href) |
| 27 | const js = await res.text() |
| 28 | const depUrlMatch = js.match( |
| 29 | new RegExp(`from\\s+"([^"]*${depIdFragment}[^"]*)"`), |
| 30 | ) |
| 31 | expect(depUrlMatch).toBeTruthy() |
| 32 | |
| 33 | const depUrl = depUrlMatch![1] |
| 34 | expect(depUrl).toContain('/deps/') |
| 35 | |
| 36 | const depRes = await page.request.get(new URL(depUrl, page.url()).href) |
| 37 | return depRes.text() |
| 38 | } |
| 39 | |
| 40 | function expectConsoleLogArgumentMapsToOriginalX( |
| 41 | depJs: string, |
no test coverage detected