javascript 使用 React.js 的 TDD/BDD?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31336618/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
TDD / BDD with React.js?
提问by cmdv
Really not that much information out there on this subject.
真的没有那么多关于这个主题的信息。
I gather Jestwould be the Facebook recommended test environment and obviously there are plenty of other testing frameworks which is irrelevant as I'm trying to obtain a list of TDD/BDD examples in React.js.
我认为Jest将是 Facebook 推荐的测试环境,显然还有很多其他测试框架是无关紧要的,因为我正在尝试获取 React.js 中的 TDD/BDD 示例列表。
Does anyone have tutorials / videos / repos / slides to help others and my self learn how TDD/BDD would be accomplished with React.js?
有没有人有教程/视频/存储库/幻灯片来帮助他人和我自己学习如何使用 React.js 完成 TDD/BDD?
This Question has been put on hold due to being "off-topic", did feel it would help lots of people and is a very good question but some (non react members) feel that's not the case.
由于“题外”,这个问题已被搁置,确实觉得它会帮助很多人并且是一个非常好的问题,但一些(非反应成员)认为情况并非如此。
So instead of killing this question off!! I've started a Git Repo and put the list of links we have so far + others that have been contributed on there. If anyone would like to contribute please send PR or add in comments bellow I'll keep adding them to the list.
所以,而不是杀死这个问题!!我已经启动了一个 Git Repo 并将我们迄今为止拥有的链接列表和其他已经贡献的链接放在那里。如果有人想贡献,请发送 PR 或在下面添加评论,我会继续将它们添加到列表中。
采纳答案by knowbody
Those helped me get started:
这些帮助我开始:
- React TDD Guide
- Using Test Driven Development with React.js to Add Multi-Select to the Drag and Drop Component
- React TDD Example: Unit Testing and Building a React Component With Jest, Gulp and React Test Utils
- Testing Flux Applications
- Awesome React - testing
- 反应 TDD 指南
- 使用测试驱动开发和 React.js 将多选添加到拖放组件
- React TDD 示例:使用 Jest、Gulp 和 React Test Utils 进行单元测试和构建 React 组件
- 测试助焊剂应用
- 很棒的 React - 测试
Also worth looking at Shallow Rendering
也值得看浅层渲染