MCPcopy Create free account
hub / github.com/denoland/std / spyLoopIterations

Function spyLoopIterations

collections/unstable_binary_search_test.ts:85–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83 await t.step("algorithm correctness - number of loop iterations", () => {
84 /** `Math.floor` calls act as a proxy for the number of loop iterations, as it's called once per iteration */
85 const spyLoopIterations = () => spy(Math, "floor");
86
87 const arr = Array.from({ length: 1_000_000 }, (_, i) => i);
88

Callers 1

Calls 1

spyFunction · 0.90

Tested by

no test coverage detected