(ip, response)
| 13 | common.skip('No IP address found'); |
| 14 | |
| 15 | function checkIpAddress(ip, response) { |
| 16 | const res = response[0]; |
| 17 | const wsUrl = res.webSocketDebuggerUrl; |
| 18 | assert.ok(wsUrl); |
| 19 | const match = wsUrl.match(/^ws:\/\/(.*):\d+\/(.*)/); |
| 20 | assert.strictEqual(ip, match[1]); |
| 21 | assert.strictEqual(res.id, match[2]); |
| 22 | assert.strictEqual(ip, res.devtoolsFrontendUrl.match(/.*ws=(.*):\d+/)[1]); |
| 23 | } |
| 24 | |
| 25 | function pickIPv4Address() { |
| 26 | for (const i of [].concat(...Object.values(os.networkInterfaces()))) { |