|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/advanced-react-testing/
课程评论:没有评论
这门 Coursera 课程“高级 React 测试:Redux Saga 和 React Router”是为已经掌握了 React 测试基础知识,并希望深入学习更复杂应用程序测试的开发者设计的。 课程内容涵盖两大核心技术: * **Redux Saga 测试:** 学习使用 `redux-saga-test-plan` 库,这是一个强大的工具,支持灵活的集成测试和精确的单元测试。课程将重点讲解 `provide()` 方法,用于静态和动态的效果模拟。 * **React Router 测试:** 课程将创建一个自定义的 `render` 方法,结合 `Testing Library`,以测试页面行为或 `React Router` 的 `history` 对象。涵盖了 URL 和查询参数的路由测试,以及带有认证保护的路由流程(包括从历史记录中移除登录页面)。 **课程亮点:** * **模块化学习:** Redux Saga 和 React Router 部分是完全独立的,你可以根据自己的需求选择学习顺序或跳过不相关的部分。 * **实战项目:** 课程使用一个已完成的、包含 Redux Saga 和 React Router(带认证保护路由)的音乐场馆应用进行教学,这个应用涉及到虚拟乐队的门票销售,增加了学习的趣味性。 * **关键工具运用:** * **Mock Service Worker:** 用于模拟网络请求数据,为你的测试提供可靠的后端数据。 * **Jest 的 `test.each()`:** 学习如何通过参数化测试来提高测试效率,针对不同数据重复运行相同的测试。 * **TypeScript 支持:** 课程采用 TypeScript 编写所有代码,遵循现代 JavaScript 的最佳实践。 * **经验丰富的讲师:** 讲师拥有多年在线课程开发经验,教学风格清晰易懂,善于与学员互动,提供支持。 总之,这门课程将帮助你掌握在复杂的 React 应用中进行全面、高效测试的技能。
Are you a developer who's learned the basics of React testing and wants to move to the next level? This course dives deep into React testing for sophisticated apps. Test Redux Saga, React Router or BothThe Redux Saga and React Router sections of the course are completely separate. You can choose which technology to start with, and skip the sections for technologies that aren't relevant to your app.Test an Existing AppThe app for the course is already built, so you'll be testing an existing app that utilizes Redux Saga and React Router (with Auth-Protected Routes). For an added bit of fun, the app is for a music venue that sells tickets to shows for fake bands, complete with fake band names, plus randomized band descriptions and photos. redux-saga-test-planTest Redux Sagas with the redux-saga-test-plan library, a powerful module that allows flexible integration testing and precise unit testing. The course covers the `provide()` method for static and dynamic effect mocking. React RouterThe course creates a custom `render` method for Testing Library to write tests that can assert either on page behavior or the React Router `history` object. Tested routes include URL and query params, and the flow for auth-protected routes (including removing the sign-in page from the history). Mock Service Worker provides mocked data for network calls to the server. Jest's test.each()In both the Redux Saga sections and the React Router sections, the course teaches Jest's test.each() method for parametrizing tests (that is running the same test multiple times with different data). TypeScriptFollowing modern JavaScript best practices, all course code is typed via TypeScript. Proven InstructorThe instructor for this course has been writing courses for Udemy since 2018, and has a great track record of courses that are clear and easy to follow. She loves interacting with students via Q & A and has a calm, supportive teaching style.