alexvictoor/RxJsKata

语言: JavaScript

git: https://github.com/alexvictoor/RxJsKata

RxJS上的一个kata,可以帮助您快速了解测试调度程序,以及其他...
A kata on RxJS that should get you up to speed with test schedulers, among other things...
README.md (中文)

Rwish

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

做这个kata你可能会学习:

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

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

关于Qunit的注意事项

Qunit断言用于所有行使。我们大多数人习惯先在断言中写出预期值,然后是实际值。这实际上是对这个kata所做的。可悲的是,Qunit反过来工作,因此当测试失败时,你会得到误导性的错误信息,其中实际意味着预期和......

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

en_README.md

RxJsKata

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...