• Overview
@angular/core

Testability

Class

The Testability service provides testing hooks that can be accessed from the browser.

  
    class Testability implements PublicTestability {}
  
  

isStable

boolean

Whether an associated application is stable

@returnsboolean

whenStable

void

Wait for the application to be stable with a timeout. If the timeout is reached before that happens, the callback receives a list of the macro tasks that were pending, otherwise null.

@paramdoneCbFunction

The callback to invoke when Angular is stable or the timeout expires whichever comes first.

@paramtimeoutnumber | undefined

Optional. The maximum time to wait for Angular to become stable. If not specified, whenStable() will wait forever.

@paramupdateCbFunction | undefined

Optional. If specified, this callback will be invoked whenever the set of pending macrotasks changes. If this callback returns true doneCb will not be invoked and no further updates will be issued.

@returnsvoid

findProviders

any[]

Find providers by name

@paramusingany

The root element to search from

@paramproviderstring

The name of binding variable

@paramexactMatchboolean

Whether using exactMatch

@returnsany[]
Jump to details