闯补惫补厂肠谤颈辫迟世界日新月异,随着我们在框架使用方面的经验越来越多,我们的推荐也随之改变。有些框架随着我们的深入使用,会使其他类似框架都黯然失色。在搁别补肠迟前端测试方面,就是这样一个例子。用它写的测试比其他框架(如Enzyme)脆弱,因为它鼓励独立测试组件间的关系,而不是测试全部实现细节。
As the pace of change in JavaScript frameworks has slowed, our teams have more time to work with specific frameworks and are gaining deeper insights as a result. With React and the dominant testing framework, Enzyme, we've observed a worrying trend of unit tests becoming tightly coupled to implementation details without providing — because the focus is on shallow details — much confidence that features work as expected. These unit tests make evolving the design difficult and they shift too much responsibility up the test pyramid to functional testing. This has made us revisit the idea of . Additionally, because of its design, trying to keep up with React's development. All this has pushed us toward assessing as a new framework for testing React applications.