This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

withModule

withModule(moduleDef: TestModuleMetadata, fn?: Function | null): (() => any) | InjectSetupWrapper
      
      withModule(moduleDef: TestModuleMetadata, fn?: Function | null): (() => any) | InjectSetupWrapper
    

Parameters

moduleDef

Type: TestModuleMetadata.

fn

Type: Function | null.

Optional. Default is undefined.

Returns

(() => any) | InjectSetupWrapper