@param {string} filePath
( filePath, gzipBytes = 100, ids = ['react-router.minimal'], )
| 12 | |
| 13 | /** @param {string} filePath */ |
| 14 | function writeCurrent( |
| 15 | filePath, |
| 16 | gzipBytes = 100, |
| 17 | ids = ['react-router.minimal'], |
| 18 | ) { |
| 19 | fs.mkdirSync(path.dirname(filePath), { recursive: true }) |
| 20 | fs.writeFileSync( |
| 21 | filePath, |
| 22 | JSON.stringify({ |
| 23 | metrics: ids.map((id) => ({ |
| 24 | id, |
| 25 | gzipBytes, |
| 26 | initialGzipBytes: gzipBytes, |
| 27 | rawBytes: gzipBytes * 3, |
| 28 | brotliBytes: gzipBytes - 10, |
| 29 | })), |
| 30 | }), |
| 31 | ) |
| 32 | } |
| 33 | |
| 34 | /** @param {import('node:test').TestContext} t */ |
| 35 | function fixture(t, measuredIds = ['react-router.minimal']) { |
no outgoing calls
no test coverage detected