Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit dfcf721

Browse files
committed
fix typo in doc/gettingstarted/testing.md
1 parent f5b6e86 commit dfcf721

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

doc/gettingstarted/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The factory methods [`startWithTiming`](https://github.com/Reactive-Extensions/R
88

99
The following example creates a hot observable sequence with specified `onNext` notifications. It then starts the test scheduler and specifies when to subscribe to and dispose of the hot observable sequence. The Start method returns an instance of an `Observer`, which contains a `messages` property that records all notifications in a list.
1010

11-
After the sequence has completed, we use can define method such as `collectionAssert.assertEqual` to compare the `messages` property, together with a list of expected values to see if both are identical (with the same number of items, and items are equal and in the same order). By doing so, we can confirm that we have indeed received the notifications that we expect. In our example, since we only start subscribing at 150, we will miss out the value 'abc'. However, when we compare the values we have received so far at 400, we notice that we have in fact received all the published values after we subscribed to the sequence. And we also verify that the OnCompleted notification was fired at the right time at 500. In addition, subscription information is also captured by the `Observable` type returned by the [`createHotObservable`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/testing/testscheduler.md#rxtestschedulerprototypecreatehotobservableargs) method.
11+
After the sequence has completed, we can use methods such as `collectionAssert.assertEqual` to compare the `messages` property, together with a list of expected values to see if both are identical (with the same number of items, and items are equal and in the same order). By doing so, we can confirm that we have indeed received the notifications that we expect. In our example, since we only start subscribing at 150, we will miss out the value 'abc'. However, when we compare the values we have received so far at 400, we notice that we have in fact received all the published values after we subscribed to the sequence. And we also verify that the OnCompleted notification was fired at the right time at 500. In addition, subscription information is also captured by the `Observable` type returned by the [`createHotObservable`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/testing/testscheduler.md#rxtestschedulerprototypecreatehotobservableargs) method.
1212

1313
In the same way, you can use that same defined method such as our `collectionAssert.assertEqual` below to confirm that subscriptions indeed happened at expected times. It is easy to wrap this for your favorite unit testing framework whether it is QUnit, Mocha, Jasmine, etc. In this example, we'll write a quick wrapper for QUnit.
1414

0 commit comments

Comments
 (0)