MCPcopy
hub / github.com/visgl/deck.gl / getResourceCountDelta

Function getResourceCountDelta

modules/test-utils/src/lifecycle-test.ts:363–374  ·  view source on GitHub ↗
(oldResourceCounts: Record<string, number>)

Source from the content-addressed store, hash-verified

361}
362
363function getResourceCountDelta(oldResourceCounts: Record<string, number>): Error | null {
364 const resourceCounts = getResourceCounts();
365
366 for (const resourceName in resourceCounts) {
367 if (resourceCounts[resourceName] !== oldResourceCounts[resourceName]) {
368 return new Error(
369 `${resourceCounts[resourceName] - oldResourceCounts[resourceName]} ${resourceName}s`
370 );
371 }
372 }
373 return null;
374}
375
376function injectSpies(layer: Layer, spies: string[], spyFactory: SpyFactory): Record<string, Spy> {
377 const spyMap: Record<string, Spy> = {};

Callers 2

cleanupAfterLayerTestsFunction · 0.85

Calls 1

getResourceCountsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…