MCPcopy Index your code
hub / github.com/angular/angular / assertNotInstantiated

Method assertNotInstantiated

packages/core/testing/src/test_bed.ts:755–762  ·  view source on GitHub ↗
(methodName: string, methodDescription: string)

Source from the content-addressed store, hash-verified

753 }
754
755 private assertNotInstantiated(methodName: string, methodDescription: string) {
756 if (this._testModuleRef !== null) {
757 throw new Error(
758 `Cannot ${methodDescription} when the test module has already been instantiated. ` +
759 `Make sure you are not using \`inject\` before \`${methodName}\`.`,
760 );
761 }
762 }
763
764 /**
765 * Check whether the module scoping queue should be flushed, and flush it if needed.

Callers 7

overrideModuleMethod · 0.95
overrideComponentMethod · 0.95
overrideDirectiveMethod · 0.95
overridePipeMethod · 0.95
overrideProviderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected