(withBase)
| 371 | }; |
| 372 | |
| 373 | function getUrlData(withBase) { |
| 374 | const data = require('../test/fixtures/wpt/url/resources/urltestdata.json'); |
| 375 | const result = []; |
| 376 | for (const item of data) { |
| 377 | if (item.failure || !item.input) continue; |
| 378 | if (withBase) { |
| 379 | // item.base might be null. It should be converted into `undefined`. |
| 380 | result.push([item.input, item.base ?? undefined]); |
| 381 | } else if (item.base !== null) { |
| 382 | result.push(item.base); |
| 383 | } |
| 384 | } |
| 385 | return result; |
| 386 | } |
| 387 | |
| 388 | /** |
| 389 | * Generate an array of data for URL benchmarks to use. |
no test coverage detected
searching dependent graphs…