MCPcopy Create free account
hub / github.com/TanStack/router / writeCurrent

Function writeCurrent

scripts/benchmarks/bundle-size/run.test.mjs:14–32  ·  view source on GitHub ↗

@param {string} filePath

(
  filePath,
  gzipBytes = 100,
  ids = ['react-router.minimal'],
)

Source from the content-addressed store, hash-verified

12
13/** @param {string} filePath */
14function 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 */
35function fixture(t, measuredIds = ['react-router.minimal']) {

Callers 2

executeFunction · 0.85
run.test.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected