https://github.com/paritosh64ce/ng-first-test
Angular testing with Jasmine & Karma in simplest possible way
https://github.com/paritosh64ce/ng-first-test
Last synced: 4 months ago
JSON representation
Angular testing with Jasmine & Karma in simplest possible way
- Host: GitHub
- URL: https://github.com/paritosh64ce/ng-first-test
- Owner: paritosh64ce
- License: mit
- Created: 2020-10-08T05:27:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-11T07:23:15.000Z (over 5 years ago)
- Last Synced: 2025-05-21T14:38:20.566Z (about 1 year ago)
- Language: HTML
- Size: 183 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NgFirstTest
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.8.
The sole intention of this project is to show various scenarios of writing Angular Unit Tests
1. `MyMathComponent`
- Starts with simplest scenarios, calling component method, handling error, resolving external dependencies, and then doing asserts
1. `MyHttpService`
- Wrapper of `HttpClient` used for the application
- Application will be communicating to the server via this wrapper, not directly
1. `MyServiceCallingComponent`
- This component calls `MyMathHttpService` to perform asynchronous operations and sets values to its member variables
1. `MyMathHttpService`
- Called by the above component, which in turn calls MyHttpService
1. `LoggerService`
- Used by components to log various messages. Application doesn't directly logs usinng `console.log`/`error`
1. `MyParentComponent`
- Parent of `MyChildComponent`. Calls child component's method using by getting instance of child usinng `@ViewChild`.
1. `MyChildComponent`
- Child of `MyParentComponent`, emits event to its parent using `EventEmitter`