Ưu đãi trong tuần: Nhập mã UD50 giảm 50k cho đơn từ 300k!
Trang chủ
Menu

Unit Testing for Typescript & NodeJs Developers with Jest

Kiểm thử đơn vị cho Lập trình viên TypeScript & NodeJs với Jest

Kiểm thử đơn vị cho Lập trình viên TypeScript & NodeJs với Jest

Thành thạo kiểm thử đơn vị với NodeJs, TypeScript, Jest và React. Viết phần mềm TypeScript và NodeJs chất lượng cao với Jest

4.8
(1,995 đánh giá)
16,523 học viên
Giảng viên
Alex Dan
Phụ đề Việt chất lượng cao Phụ đề tiếng Anh Bán chạy Đánh giá cao
50.000đ 349.000đ -86%
✓ Xem giỏ hàng và thanh toán
Bao gồm phụ đề tiếng Việt, tiếng Anh
11.5 giờ video
102 bài giảng
3 bài quiz
1 bài coding
Truy cập vĩnh viễn
Học trên mọi thiết bị
Cập nhật: 30/05/2026

Bạn sẽ học được gì

Kiến thức cơ bản về kiểm thử đơn vị TypeScript với Jest
Kiểm thử tích hợp với TypeScript
Phát triển hướng kiểm thử (TDD) với Jest
Kiểm thử đơn vị React với TypeScript và Jest
CI/CD với GitHub Actions và Docker
Jest - kiến thức cơ bản: hooks, assertions, matchers
Jest - phần nâng cao: bí danh, matchers tùy chỉnh, snapshot
Kỹ thuật kiểm thử đơn vị nâng cao sử dụng Jest
Kiểm thử thao tác cơ sở dữ liệu với Docker và Jest

Yêu cầu

Kiến thức cơ bản về TypeScript
Kiến thức cơ bản về NodeJs
Kiến thức cơ bản về React (cho phần React)

Đối tượng phù hợp

Lập trình viên NodeJs hoặc TypeScript muốn hiểu sâu về kiểm thử đơn vị và tích hợp
Lập trình viên React muốn kiểm thử ứng dụng của họ
Lập trình viên muốn viết code chắc chắn và sạch sẽ
Lập trình viên muốn học Jest

Nội dung khóa học

14 phần • 102 bài giảng
1 Cách học khóa học này
2 Công cụ cần thiết
3 Tại sao chúng ta cần kiểm thử
4 Truy cập tài nguyên khóa học
1 Giới thiệu phần
2 Giới thiệu Jest
3 Thiết lập dự án Jest
4 Cấu trúc một bài kiểm thử đơn vị
5 Assertions và matchers trong Jest
6 Cấu trúc nhiều bài kiểm thử
7 Kiểm thử tham số hóa
1 Giới thiệu phần
2 Nguyên tắc F.I.R.S.T.
3 Jest hooks
4 Kiểm thử lỗi
5 Bí danh Jest và chế độ theo dõi
6 Cấu hình debug VSCode
7 Phạm vi kiểm thử (Coverage)
1 Giới thiệu phần
2 Giới thiệu Phát triển hướng kiểm thử
3 Coding Katas - trình kiểm tra mật khẩu
4 Thiết lập PassChecker
5 PassChecker Lần lặp 1
6 PassChecker Lần lặp 2
7 PassChecker Lần lặp 3
1 Giới thiệu phần
2 Test doubles là gì
3 Stubs
4 Fakes
5 Mocks
6 Spies
7 Mocking modules
1 Giới thiệu phần
2 Giới thiệu dự án
3 Cài đặt dự án
4 Kiểm thử mảng
5 Mocking consumer classes
6 Tiêm mocks
7 Giải thích các bài kiểm thử
8 Ứng dụng dựa trên sự kiện - kiểm thử
9 Kiểm thử máy chủ 1 - thiết lập
10 Kiểm thử máy chủ 2 - debug nâng cao
11 Kiểm thử máy chủ 3 - prototype spies
12 Hoàn thiện các bài kiểm thử
13 Kết luận kiểm thử high mock
1 Giới thiệu phần
2 Xây dựng testing wrappers
3 Thiết lập kiểm thử
4 Hoàn thiện kiểm thử
5 Kết luận kiểm thử low mock
1 Giới thiệu phần
2 Hiểu về kiểm thử tích hợp
3 Thiết lập kiểm thử tích hợp
4 Viết bài kiểm thử tích hợp
1 Giới thiệu phần
2 Biến môi trường
3 Nhiều cấu hình kiểm thử
4 Kiểm thử snapshot
5 Matchers tùy chỉnh
6 Khám phá module test runner của NodeJs
7 So sánh các framework kiểm thử
1 Giới thiệu phần
2 Thiết lập ứng dụng React TypeScript đơn giản
3 Generics, state, props
4 Chúng ta sẽ kiểm thử gì
5 Bài kiểm thử đầu tiên - render components React TypeScript
6 React testing library: truy vấn phần tử
7 Kiểm thử tương tác người dùng
8 Kiểm thử cập nhật bất đồng bộ
1 Giới thiệu phần
2 Tài nguyên phần
3 GitHub actions
4 Pipeline với kiểm thử Jest
5 Kiểm thử cơ sở dữ liệu cục bộ với Docker
6 Docker trên Github actions
1 Chọn dự án thực hành
2 Bài học kết thúc
1 Giới thiệu TypeScript
2 Chạy code TS
3 Các kiểu trong TypeScript
4 Kiểu do người dùng định nghĩa
5 Thuộc tính tùy chọn
6 Type guards
7 Tùy chọn trình biên dịch
8 Lớp
9 Access modifiers
10 Kế thừa
11 Giao diện
12 Generics
13 Promises
14 Modules
15 Chế độ nghiêm ngặt
16 Undefined, null, never, unknown
17 Enums và câu lệnh Switch
18 Chạy trên NodeJs
19 Debug Node TypeScript
20 Chạy trên trình duyệt
21 TypeScript với Webpack
22 Giới thiệu Decorators
23 Method decorators
24 Lời kết
1 Quà tặng

Giới thiệu khóa học

A must have skill for senior developers

Typescript is getting more and more popularity and it is a required skill for many IT jobs. It's key feature is type safety, thus preventing bugs.

But yes another skill is very important for any programming job: unit testing. Combining these two techniques will result in solid, robust and bug free code.

This course will go beyond the basics of unit testing and teach you all you need to write real world, complex testing suites for NodeJs and Typescript applications using the most popular JavaScript testing library: Jest.

Using Jest as an unit testing library provides many advantages:

  • Unitary unit testing library for running and structuring tests

  • Extensive mocking, stubbing and spying capabilities

  • Powerful matchers to create simple to read tests

  • Jest ships as one unitary NPM package

  • Jest is the default choice for TypeScript React projects

Why unit testing NodeJs apps?

Unit testing usually adds a lot to a code base, two or tree times in some cases. This also means that a lot of time needs to be invested in writing and setting up tests. But all this effort pays of: time, effort and headache of fixing bugs can be used for more fun activities.

What you will get from this course:

  • setup NodeJs and Typescript projects from scratch

  • implement unit testing with Jest

  • learn about unit testing configuration with parameters like: roots, transform, testRegex or verbose

  • learn about Jest test suites structure: describe with value, test, descriptions, hooks like beforeEach

  • basic and advanced assertions, comparing primitive types, objects or even errors

  • instantiating test double objects like mocks, stubs, spies or fakes.

  • write complex mock objects which can be used with "strange" JavaScript libraries.

  • inject doubles: directly inside the constructor, over the module or even using the objects prototype

  • learn about deep mocks and matchers to make your tests even better

  • integration tests for a NodeJs server application

  • Conditionally and asynchronously skip tests

Dedicated sections on unit testing mocks:

  • Jest mocks, spies

  • How to use stubs

  • London/Chicago testing approach, with the advantages and disadvantages of each one

In this course you will learn how to use Test Driven Development (TDD):

  • Analyze the advantages of TDD

  • Hands-on practice with a great coding kata: password checker

Separate section on Jest Integration tests for Rest APIs:

  • learn how to setup integration tests

  • learn the difference between integration tests and unit tests

  • write integration tests for a Rest API with Jest

Dedicated section on Jest React unit testing:

  • How to test for React components with Jest

  • How to test React async code

  • How to debug React Typescript apps

The examples used in the course follow very high coding guidelines for Typescript, NodeJs and React. Async/await syntax is used for clear and concise code, and of course, you will see how to test asynchronous code, on server, but also in the front end.

Course advantages:

  • Respect for your time: most of the time of the instructor typing is cut off, the course is focused on unit tests and Jest explanations

  • Concise: learn only what you need, no fillers to make the course falsely more appealing

  • Experienced and programming active instructor: a great teacher never looses touch with the industry. This is especially true for software development, where the industry is so dynamic. This helps the instructor stay up to date with the best coding guidelines and present you the challenging parts, not the "hello world"

  • Organized course structure: six parts, progressive approach, consistent content

  • Code changes in each lecture on Git with code diffs: this will help you get an concise overview of the lecture and correct in case you missed something

  • Big font, dark background, fullHD content, this way it is readable even on a small screen or even tablet.

  • Lifetime access

  • Certificate of completion to present to your current or prospective employer

Do you want your Typescript or NodeJs code to have the best quality, and your project to be safe?

Enroll and start writing your tests in 10 minutes!



Khóa học liên quan

Khám phá thêm các khoá học cùng chủ đề

Hiển thị tất cả khoá học Jest
Hiển thị tất cả khoá học Software Development
Hiển thị tất cả khoá học Testing
Hiển thị tất cả khoá học Typescript
Zalo
Tôi có thể tư vấn khoá học cho bạn 😊