-
Notifications
You must be signed in to change notification settings - Fork 1
Angular Testing Overview
Aakash Goplani edited this page May 3, 2020
·
4 revisions
Topics Covered
- Overview
- Jasmine & Karma
- Testing Classes & Pipes
- Testing with Mocks & Spies
- Angular Test Bed
- Testing Change Detection
- Testing Asynchronous Code
- Testing Dependency Injection
- Testing Components
- Testing Directives
- Testing Model-Driven Forms
- Testing Http
- Testing Routing
Follow these principles:
- Arrange: all necessary preconditions and inputs {set initial state}
- Act: on object or class under test {change initial state}
- Assert: that the expected test results have occurred {check new state is correct}
Ignore given test case: append it with x
xdescribe('', () => {
xit('', () => {});
});
Run only single test case: append it with f
fdescribe('', () => {
fit('', () => {});
});