Enable javascript in your browser for better experience. Need to know to enable it? Go here.
radar blip
radar blip

React Testing Library

本页面中的信息并不完全以您的首选语言展示,我们正在完善其他语言版本。想要以您的首选语言了解相关信息,可以点击这里下载PDF。
更新于 : May 19, 2020
不在本期内容中
这一条目不在当前版本的技术雷达中。如果它出现在最近几期中,那么它很有可能仍然具有相关参考价值。如果这一条目出现在更早的雷达中,那么它很有可能已经不再具有相关性,我们的评估将不再适用于当下。很遗憾我们没有足够的带宽来持续评估以往的雷达内容。 了解更多
May 2020
Adopt ? 我们强烈建议业界采用这些技术,我们将会在任何合适的项目中使用它们。

JavaScript的世界日新月异,随着我们使用框架的经验越来越多,我们的倾向也在改变。我们深入使用某些框架,其他备选框架自然黯然失色。在React前端测试方面,React Testing Library就是这样一个例子。我们团队很喜欢的是,用这个框架写的测试比其他框架(如 Enzyme)更健壮,因为它鼓励独立测试组件间的关系,而不是测试全部实现细节。 这种思维源自于测试库,React Testing Library 是它的一部分,它还为像AngularVue.js这样的框架提供了一整套库。

Nov 2019
Trial ? 值得一试。了解为何要构建这一能力是很重要的。企业应当在风险可控的前提下在项目中尝试应用此项技术。

JavaScript世界日新月异,随着我们在框架使用方面的经验越来越多,我们的推荐也随之改变。有些框架随着我们的深入使用,会使其他类似框架都黯然失色。在React前端测试方面,React Testing Library就是这样一个例子。用它写的测试比其他框架(如Enzyme)脆弱,因为它鼓励独立测试组件间的关系,而不是测试全部实现细节。

Apr 2019
Assess ? 在了解它将对你的企业产生什么影响的前提下值得探索

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 subcutaneous testing. Additionally, because of its design, Enzyme has issues trying to keep up with React's development. All this has pushed us toward assessing react-testing-library as a new framework for testing React applications.

发布于 : Apr 24, 2019

下载 PDF

 

English | Español | Português | 中文

订阅技术雷达简报

 

立即订阅

查看存档并阅读往期内容