(
snapshot: string,
opts: { duration?: boolean | undefined; filePath?: boolean | undefined } = {},
)
| 14 | // Normalize random ports. Not only are these ports random, but since the number of digits |
| 15 | // in the port can vary, the formatting of the ASCII box drawn around it also varies. |
| 16 | const normalizeSnapshot = ( |
| 17 | snapshot: string, |
| 18 | opts: { duration?: boolean | undefined; filePath?: boolean | undefined } = {}, |
| 19 | ) => |
| 20 | normalize(snapshot, opts).replace( |
| 21 | // eslint-disable-next-line no-irregular-whitespace |
| 22 | /⬥ Static server listening to \d+[\s╭─│─╰╮╯⬥ ]+ Local dev server ready: http:\/\/localhost:\d+ [\s╭─│─╰╮╯]+/m, |
| 23 | `⬥ Static server listening to <SNAPSHOT_PORT_NORMALIZED> |
| 24 | |
| 25 | ┌──────────────────────────────────────────────────────────────────────────┐ |
| 26 | │ │ |
| 27 | │ Local dev server ready: http://localhost:<SNAPSHOT_PORT_NORMALIZED> │ |
| 28 | │ │ |
| 29 | └──────────────────────────────────────────────────────────────────────────┘`, |
| 30 | ) |
| 31 | |
| 32 | describe.concurrent('frameworks/framework-detection', () => { |
| 33 | test('should default to process.cwd() and static server', async (t) => { |
no test coverage detected