(length: number)
| 12 | 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
| 13 | |
| 14 | const randomAlnum = (length: number): string => { |
| 15 | let out = ''; |
| 16 | while (out.length < length) { |
| 17 | for (const byte of randomBytes(length * 2)) { |
| 18 | if (byte < 248) { |
| 19 | out += ALNUM[byte % 62]; |
| 20 | } |
| 21 | if (out.length === length) { |
| 22 | break; |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | return out; |
| 27 | }; |
| 28 | |
| 29 | setup('seed da2 tracking cookie', async ({ context, baseURL }) => { |
| 30 | if (!baseURL) { |