JavaScript Unit Testing - The Practical Guide

所在平台: Udemy

课程主页: https://www.udemy.com/course/javascript-unit-testing-the-practical-guide/

课程评论:没有评论

第一个写评论        关注课程

课程简介

**JavaScript单元测试:实用指南** 本课程旨在帮助开发者掌握JavaScript的自动化单元及集成测试。课程从基础知识入手,教授如何编写和集成测试,明确测试的范围,以及如何处理简单和复杂的代码测试。 课程内容涵盖: * **测试基础:** 什么是自动化测试及其重要性,以及单元测试的概念。 * **工具与设置:** 介绍编写自动化测试所需的软件和配置。 * **测试编写:** 如何实际编写单元测试,包括不同类型的期望(断言)。 * **测试策略:** 学习如何处理同步与异步代码,并通过模拟(mocking)和间谍(spies)等技术应对副作用。 * **实战应用:** 通过实际项目示例,学习测试模式,并将所有概念应用到真实的项目中。 本课程以Vitest作为主要的测试库和工具,Vitest是一个现代化的JavaScript测试运行器和断言库,并兼容Jest。无论您使用Vitest还是Jest,抑或是任何其他测试框架,本课程的核心概念都将使您受益。课程不局限于特定类型的JavaScript项目、库或框架,而是专注于纯JavaScript代码(包括NodeJS和前端项目)的自动化测试。通过本课程,您将为今后的所有JavaScript项目(包括后端和前端,如React, Vue, Angular等)打下坚实的测试基础。

课程评论(0条)

课程详情

Automated testing is a key concept in modern (web) development.It is a concept that can be intimidating at first, hence many developers shy away from diving into testing and adding tests to their projects.This course teaches you automated unit & integration testing with JavaScript from the ground up. You will learn how tests are written and added to your projects, what should (and should not) be tested and how you can test both simple as well as more complex code.You will learn about the software and setup required to write automated tests and example projects will be provided as part of the course. It's a hands-on, practical course, hence you won't get stuck in theory - instead you'll be able to learn all key concepts at real examples.In the course, Vitest will be used as the main testing library & tool. It's a modern JavaScript test runner and assertion library that provides Jest compatibility. Hence what you'll learn in this course will help you no matter if you're working with Vitest or Jest. And the core concepts will apply, no matter which testing setup you're using at all!As part of this course, typical testing problems will be defined and solved and common strategies like mocking or working with spies are taught in great detail. This course also does not focus on specific types of JavaScript projects - neither does it focus on any specific library or framework.Instead, you'll learn how to automatically test your (vanilla) JavaScript code, no matter if it's a NodeJS or frontend project. The fundamentals you'll gain in this course will help you in all your future projects - backend (NodeJS) and frontend (vanilla JS, React, Vue, Angular) alike.This course will provide you with an extremely solid foundation to build up on, such that you can start adding tests to all your JavaScript projects.In detail, this course will teach you:What exactly "testing" or "automated testing" is (and why you need it)What "unit testing" is specificallyWhich tools you need to enable automated unit tests in your projectsHow to write unit testsHow to get started with integration testsHow to formulate different expectations (assertions)Which patterns to follow when writing testsHow to test asynchronous and synchronous codeHow to deal with side effects with help of spies & mocksHow to apply all these concepts in real projects & examples

课程标签

0人关注该课程

主题相关的课程