语言: JavaScript


A kata on RxJS that should get you up to speed with test schedulers, among other things... (中文)


这个kata的目的是掌握在现实生活RX应用程序上必须使用的概念和工具。 强烈建议在做这个kata之前经历过优秀的RxJs Koans。说到这个kata的技术先决条件,安装过程与RxJs Koans相同。


  1. 不同类型的可观察物,冷热
  2. 测试调度程序和时间虚拟化
  3. 将所有人与涉及多个Rx运营商的行业放在一起

与RxJs koans一样,kata始于带有“__”占位符的简单练习。这些练习应该让您了解热/冷概念,并让您熟悉测试计划程序。 这个kata的第二部分由3个更复杂的练习组成。在这些练习中,需要编写一大堆代码,转换Rx流,以便成功运行现有的单元测试。



本文使用googletrans自动翻译,仅供参考, 原文来自


The aim of this kata is to have a grasp on concepts and tools that are mandatory working on a real life RX applications.
It is highly recommended to have gone through the excellent RxJs Koans before doing this kata. Speaking ow which, technical pre requisites, installation process for this kata are the same than the ones for RxJs Koans.

Doing this kata you might learn things on:

  1. the different types of observables, hot and cold
  2. test schedulers and time virtualisation
  3. putting all together with exercices involving several Rx operators

As with RxJs koans, the kata begins with simple exercices with "__" placeholders. These exercices should give you understanding on hot/cold concepts and get you familiar with test scheduler.
The second part of this kata is made of 3 more complex exercices. On these exercices, a chunk of code, transforming Rx streams, need to be written in order to get existing unit tests running successfully.

Note about Qunit

Qunit assertions are used on all exercices. Most of us are used to write first in an assertion the expected value and then the actual value. This is actually what has been done on this kata. Sadly Qunit works the other way around and hence when tests fail you get misleading error messages where actual means expected and...