Test Driven Development with Cypress/Jest
This is supposed to be a longer description
Setting up the Server
Creating the real server for the applicationPRO
- Source Code & Resources PRO
- Lesson 1: Introduction PUBLIC
- Lesson 2: Introduction to Test Driven Development PUBLIC
- Lesson 3: Testing Concepts PUBLIC
- Lesson 4: Jest and Cypress PRO
- Lesson 5: A Simple Unit Test PRO
- Lesson 6: A Simple E2E Test PRO
- Lesson 7: Introduction to Angular's TestBed PRO
- Lesson 8: Setting up Tests with Jest and Cypress PUBLIC
- Lesson 9: Test Development Cycle PRO
- Lesson 10: Setting up Cypress & Jest in an Ionic/Angular Project PRO
- Lesson 11: The First Tests PRO
- Lesson 12: Injected Dependencies & Spying on Function Calls PRO
- Lesson 13: Building out Core Functionality PRO
- Lesson 14: Testing Asynchronous Code PRO
- Lesson 15: Creating a Mock Backend PRO
- Lesson 16: Setting up the Server PRO
- Lesson 17: Testing Integration with a Server PRO
- Lesson 18: Testing Storage and Reauthentication PRO
- Lesson 19: Refactoring with Confidence PRO
- Lesson 20: Conclusion PRO
Setting up the Server
With the theory of the last two lessons out of the way, we now have all the knowledge we need to finish off the rest of the tests for our application. Now we are going to focus on one of the more complex requirements that we had for the application.
- A user should only be able to log in to the application with a valid license key from SendOwl
In order to implement this requirement, we will need to create a unit test for a service that handles checking a license key against a server - which isn't a problem because we know how to create a mocked backend now. As we know, a unit test by itself is not enough - we will also need to implement an E2E test for this functionality. When running our E2E test we will not be mocking the backend, we will be hitting the real server.
The specific integration with SendOwl is not really important. However, if you are interested in how that integration works I will be leaving the code for that in the server setup - it will just be commented out. If you want to actually set up the integration with SendOwl you would need to create your own SendOwl account and set up a product that you want to sell.
Thanks for checking out the preview of this lesson!
You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).