We may earn an affiliate commission when you visit our partners.
Course image
Alex Dan

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.

Read more

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.

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Learning objectives

  • Basics of typescript unit testing with jest
  • Integration tests with typescript
  • Test driven development (tdd) with jest
  • Unit testing react with typescript and jest
  • Cicd with github actions and docker
  • Jest - the basics: hooks, assertions, matchers
  • Jest - the advanced parts: aliases, custom matchers, snapshots
  • Advanced unit testing techniques using jest
  • Database operations testing with docker and jest

Syllabus

Getting started
How to take this course
Let's connect!
Tools we will need
Read more
Why we need tests
Course resources access
Basics of testing with Jest
Section intro
Jest introduction
Jest project setup
Structure of an unit test
Jest assertions and matchers
Multiple tests structure
Parametrized tests

Let's quickly summarize what you learned in this section!

Intermediate testing topics
F.I.R.S.T. principles
Jest hooks
Testing for errors
Jest aliases and watch mode
VSCode debug configuration
Coverage

Let's remember the FIRST principles!

Test Driven Development with Jest and TypeScript
Test Driven Development intro
Coding Katas - password checker
PassChecker setup
PassChecker Iteration 1
PassChecker Iteration 2
PassChecker Iteration 3
Game coding exercise
Test doubles in Jest
What are test doubles
Stubs
Fakes
Mocks
Spies
Mocking modules
Test doubles in practice
Project presentation
Project installation
Testing arrays
Mocking consumer classes
Injecting mocks
Explaining tests
Event based app - tests
Server tests 1 - setup
Server tests 2 - advanced debugging
Server tests 3 - prototype spies
Finishing the tests
High mock tests conclusion
Low mocks tests
Building testing wrappers
Setup tests
Finishing tests
Low mock tests conclusion
Integration testing
Understanding integration tests
Integration tests setup
Writing integration tests
Other testing topics
Environment variables
Multiple test configurations
Snapshot testing
Custom matchers
Exploring the NodeJs test runner module
Testing frameworks comparison
React unit testing with Jest
Simple React Typescript app setup
Generics, state, props
What we will test
First tests - rendering React TypeScript components
React testing library: query for elements
Testing user interaction
Testing async updates
CICD with GitHub actions and Docker
Section resources
GiHub actions
Pipeline with Jest tests
Local DB testing with Docker
Docker on Github actions
Course conclussions
Choosing a work project
Ending lecture
TypeScript recap
TypeScript presentation
Running TS code
Types in Typescript
User defined types
Optional properties
Type guards

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Helps learners write real-world complex testing suites for NodeJs and Typescript applications
Teaches knowledge and skills that are in high demand in the industry
Helps learners build a strong foundation in unit testing
Provides hands-on coding exercises and real-world scenarios to improve learners' understanding
May require learners to have some existing knowledge of TypeScript and NodeJs

Save this course

Save Unit Testing for Typescript & NodeJs Developers with Jest to your list so you can find it easily later:
Save

Reviews summary

Well-received intro to testing

Learners largely agree that this is a well-structured course for beginners. The engaging video lectures with clear explanations make it easy to remember and enjoyable to learn. Sal Jade, the course instructor, is praised for her in-depth knowledge of the subject and excellent teaching skills.
Video lectures make learning enjoyable
"very interesting, easy to follow, easy to understand. Very enjoyable"
"I like the way the course is set up"
"she can teach well. She talks widely about each card"
Course is well-structured for beginners
"It was great course for beginners. simple to follow"
"The course is good, profound knowledge. I hope it gets more advance when I follow with the rest"
"Sal's background as a teacher really shows in the way she structures her courses and in the way she produces the content"
Explanations are easy to follow.
"good easy to understand"
"easy to understand and lots of examples"
"easy to understand for beginners"
Sal Jade has in-depth knowledge of the subject
"truly educational course, Sal Jade teaches every aspect of the deck, leaving nothing out"
"I appreciate the instructors intuitiveness and incredible amount of knowledge. Thank you!"
"she really knows her stuff and is a great resource for mastering the tarot!"

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Unit Testing for Typescript & NodeJs Developers with Jest with these activities:
TypeScript unit testing tutorial
Follow a guided tutorial to learn the basics of TypeScript unit testing, including assertions, matchers, and test doubles.
Show steps
  • Watch the first video on TypeScript assertions.
  • Watch the second video on TypeScript matchers.
  • Watch the third video on TypeScript test doubles.
TypeScript unit testing workshop
Attend a workshop to learn about TypeScript unit testing in a hands-on environment.
Show steps
  • Register for the workshop.
  • Attend the workshop.
  • Complete the workshop exercises.
Jest testing tutorial
Follow a guided tutorial to learn the basics of Jest testing, including assertions, matchers, and test doubles.
Show steps
  • Watch the first video on Jest assertions.
  • Watch the second video on Jest matchers.
  • Watch the third video on Jest test doubles.
Five other activities
Expand to see all activities and additional details
Show all eight activities
Jest testing workshop
Attend a workshop to learn about Jest testing in a hands-on environment.
Show steps
  • Register for the workshop.
  • Attend the workshop.
  • Complete the workshop exercises.
TypeScript unit testing - practice problems
Complete a series of TypeScript unit testing practice problems to solidify concepts and improve proficiency.
Show steps
  • Complete the first practice problem on TypeScript assertions and matchers.
  • Complete the second practice problem on TypeScript test suites.
  • Complete the third practice problem on TypeScript test doubles.
Jest testing - practice problems
Complete a series of Jest testing practice problems to solidify concepts and improve proficiency.
Show steps
  • Complete the first practice problem on Jest assertions and matchers.
  • Complete the second practice problem on Jest test suites.
  • Complete the third practice problem on Jest test doubles.
TypeScript unit testing project
Build a TypeScript unit testing project to demonstrate your understanding of TypeScript unit testing concepts.
Show steps
  • Create a new TypeScript project.
  • Install Jest and add a configuration file.
  • Write unit tests for a simple TypeScript function.
Jest testing project
Build a Jest testing project to demonstrate your understanding of Jest testing concepts.
Show steps
  • Create a new JavaScript project.
  • Install Jest and add a configuration file.
  • Write unit tests for a simple JavaScript function.

Career center

Learners who complete Unit Testing for Typescript & NodeJs Developers with Jest will develop knowledge and skills that may be useful to these careers:
Test Engineer
Test Engineers are responsible for testing software applications to ensure that they meet the requirements of the users. They write test cases, execute tests, and analyze the results. This course will provide you with the skills you need to become a successful Test Engineer. You will learn how to write effective test cases, how to execute tests efficiently, and how to analyze the results.
Web Developer
Web Developers design, develop, and maintain websites. They work with both the front end and back end of a website, ensuring that it is both visually appealing and functional. This course will help you build a strong foundation in unit testing, which is an essential skill for any web developer. Unit testing will allow you to ensure that your website is bug-free.
Full-Stack Developer
Full-Stack Developers are responsible for the design and development of both the front-end and back-end of a website or application. They work with designers and other developers to create a website or application that is both visually appealing and functional. This course will help you build a strong foundation in unit testing, which is an essential skill for any Full-Stack Developer. Unit testing allows you to test individual units of code, which helps to ensure that the website or application is bug-free and reliable.
Software Developer
As a Software Developer, you will be responsible for designing, developing, and maintaining software applications. This course will help you build a strong foundation in unit testing, which is an essential skill for any developer. Unit testing allows you to test individual units of code, which helps to ensure that your software is bug-free and reliable.
Software Tester
Software Testers are responsible for testing software applications to ensure that they meet the requirements of the users. They write test cases, execute tests, and analyze the results. This course will provide you with the skills you need to become a successful Software Tester. You will learn how to write effective test cases, how to execute tests efficiently, and how to analyze the results.
Quality Assurance Analyst
Quality Assurance Analysts are responsible for ensuring that software applications are of high quality. They work with developers to identify and fix bugs, and they also develop and implement quality assurance processes. This course will provide you with the skills you need to become a successful Quality Assurance Analyst. You will learn how to identify and fix bugs, how to develop and implement quality assurance processes, and how to work effectively with developers.
Software Engineer
Software Engineers use the principles of software development to create new applications or improve existing ones. They analyze user needs and write, test, and maintain code. This course will provide you with the skills you need to write high-quality code that meets the needs of users.
Software Architect
Software Architects design and develop the architecture of software systems. They work with stakeholders to understand the requirements of the system, and they develop the plans and specifications that will be used to build the system. This course will help you build a strong foundation in unit testing, which is an essential skill for any Software Architect. Unit testing allows you to test individual units of code, which helps to ensure that the system is bug-free and reliable.
Back-End Developer
Back-End Developers are responsible for the development and maintenance of the server-side of a website or application. They work with front-end developers to create a website or application that is both visually appealing and functional. This course will help you build a strong foundation in unit testing, which is an essential skill for any Back-End Developer. Unit testing allows you to test individual units of code, which helps to ensure that the server-side is bug-free and reliable.
Front-End Developer
Front-End Developers are responsible for the design and implementation of the user interface of a website or application. They work with designers and back-end developers to create a website or application that is both visually appealing and functional. This course will help you build a strong foundation in unit testing, which is an essential skill for any Front-End Developer. Unit testing allows you to test individual units of code, which helps to ensure that the user interface is bug-free and reliable.
Technical Lead
Technical Leads are responsible for leading and managing a team of developers. They work with the team to develop and implement software solutions. This course will help you build a strong foundation in unit testing, which is a valuable skill for any Technical Lead. Unit testing allows you to test individual units of code, which helps to ensure that the software solution is bug-free and reliable.
DevOps Engineer
DevOps Engineers are responsible for the development and maintenance of the software development pipeline. They work with developers and operations teams to ensure that the software development process is efficient and reliable. This course will help you build a strong foundation in unit testing, which is a valuable skill for any DevOps Engineer. Unit testing allows you to test individual units of code, which helps to ensure that the software development pipeline is bug-free and reliable.
Project Manager
Project Managers are responsible for planning, coordinating, and executing software development projects. They work with stakeholders to define the scope of the project, and they develop and implement the plans and specifications that will be used to complete the project. This course may be helpful for you as a project manager, as it will help you understand the importance of unit testing and the skills that developers use to test their code. It may help you communicate with developers more effectively, and may help you to ensure that the software development project is completed on time and within budget.
Computer Science Professor
Computer Science Professors teach computer science courses at colleges and universities. They work with students to develop their understanding of computer science concepts, and they conduct research in the field of computer science. This course may be helpful for you as a Computer Science Professor, as it will help you stay up-to-date on the latest unit testing techniques. It may also help you to develop new and innovative ways to teach computer science concepts to your students.
Data Scientist
Data Scientists use data to solve business problems. They work with data to identify trends and patterns, and they develop models that can be used to make predictions. This course may be helpful for you as a Data Scientist, as it will help you to understand the importance of data quality and the skills that developers use to test their code. It may help you communicate with developers more effectively, and may help you to ensure that the data science project is completed on time and within budget.

Reading list

We've selected seven books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Unit Testing for Typescript & NodeJs Developers with Jest.
Provides a comprehensive overview of unit testing, including best practices and common pitfalls. It valuable resource for anyone who wants to improve their unit testing skills.
Provides a collection of design patterns for JavaScript applications. It valuable resource for anyone who wants to learn how to design and develop reusable and maintainable code.
Provides a collection of design patterns for Node.js applications. It valuable resource for anyone who wants to learn how to design and develop scalable and efficient Node.js applications.
Provides a practical guide to unit testing with Jest. It valuable resource for anyone who wants to learn how to test JavaScript applications with Jest.
Provides a comprehensive guide to unit testing with Pytest. It valuable resource for anyone who wants to learn how to test Python applications with Pytest.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Unit Testing for Typescript & NodeJs Developers with Jest.
JavaScript Unit Testing - The Practical Guide
Most relevant
Introduction to Unit Testing in Jest - The Fundamentals
Most relevant
Testing JavaScript with Jasmine 2 and TypeScript
Most relevant
JavaScript Unit Testing with Jest
Most relevant
AWS & Typescript Masterclass - CDK, Serverless, React
Most relevant
Software Testing for Developers
Most relevant
Learn Unit Testing with NUnit and C#
Most relevant
Mobile Development and JavaScript
Most relevant
Testing Apollo 3
Most relevant
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser