Skip to content

theryansmee/jest-mocking-like-a-pro

Repository files navigation

Mocking data like a pro tutorial

Description

This project has been created to accompany my Mocking data like a pro video.

In this video we cover the most robust and flexible way to mock data in Angular when writing unit tests.

With these new mocks we will:

  • Have access to default values
  • Be able to override any/all of the values with minimal effort

We will also look at ways to speed up writing our mocks to ensure that you spend less time writing tests, and more time writing code!

Branches

  • master - Contains base project with tests written using the classic style of data mocks
  • version/completed-mocks - The finished product with our new any shiny data mock classes implimented

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Angular version

10.1.15