Rx.ReactiveTest

This class contains test utility methods such as create notifications for testing purposes.

Location

  • rx.testing.js

ReactiveTest Class Methods ##

ReactiveTest Class Fields ##

ReactiveTest Class Methods ##

Rx.ReactiveTest.onCompleted(ticks)

#

Factory method for an OnCompleted notification record at a given time.

Arguments

  1. ticks (Number): Recorded virtual time the OnCompleted notification occurs.

Returns

(Recorded): OnCompleted notification.

Example

Location

  • rx.testing.js

Rx.ReactiveTest.onError(ticks, exception)

#

Factory method for an OnError notification record at a given time with a given error.

Arguments

  1. ticks (Number): Recorded virtual time the OnError notification occurs.

  2. exception (Error | Function): Recorded exception stored in the OnError notification or a predicate

Returns

(Recorded): Recorded OnError notification.

Example

Location

  • rx.testing.js

Rx.ReactiveTest.onNext(ticks, value)

#

Factory method for an OnNext notification record at a given time with a given error.

Arguments

  1. ticks (Number): Recorded virtual time the OnNext notification occurs.

  2. value (Any | Function): Recorded exception stored in the OnNext notification or a predicate

Returns

(Recorded): Recorded OnNext notification.

Example

Location

  • rx.testing.js

ReactiveTest Class Fields ##

Rx.ReactiveTest.created

#

Default virtual time used for creation of observable sequences in unit tests. This has a value of 100.

Example

Location

  • rx.testing.js

Rx.ReactiveTest.disposed

#

Default virtual time used to dispose subscriptions in unit tests. This has a value of 1000.

Example

Location

  • rx.testing.js

Rx.ReactiveTest.subscribed

#

Default virtual time used to subscribe to observable sequences in unit tests. This has a value of 200.

Example

Location

  • rx.testing.js

Last updated

Was this helpful?