MCPcopy Create free account
hub / github.com/ampproject/amphtml / disposableFactory

Function disposableFactory

test/unit/test-service.js:417–421  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

415 it('should dispose disposable services', () => {
416 expectAsyncConsoleError(/intentional/);
417 const disposableFactory = function () {
418 return {
419 dispose: env.sandbox.spy(),
420 };
421 };
422 registerServiceBuilderForDoc(node, 'a', disposableFactory);
423 const disposable = getServiceForDoc(node, 'a');
424

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected