slides source Javascript 的测试, 不管在用 jasmine 还是 mocha, 都是很头疼的事情. 但是自从有了 jest, 一口气写7个测试, 腰也不疼了, 头也不疼了. 只需要 3 个理由 在说用 jest 测为什么好之前,我们先来看我们要测的一个例子.