https://github.com/gaurav-balyan/hrs-challenge
A project in which there is explanation about how to do unit testing
https://github.com/gaurav-balyan/hrs-challenge
jasmine-matchers jasmine-tests karma-jasmine karma-reporter mock spy
Last synced: about 1 month ago
JSON representation
A project in which there is explanation about how to do unit testing
- Host: GitHub
- URL: https://github.com/gaurav-balyan/hrs-challenge
- Owner: Gaurav-Balyan
- Created: 2021-07-03T11:32:51.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-29T16:19:50.000Z (over 3 years ago)
- Last Synced: 2025-01-30T06:41:23.716Z (3 months ago)
- Topics: jasmine-matchers, jasmine-tests, karma-jasmine, karma-reporter, mock, spy
- Language: TypeScript
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AngularChallenge
Welcome to the Health Recovery Solutions coding challenge. This is a basic login application using recent version of Angular and Typescript. Your challenge is to do the following:
* Fix any compiling errors before running
## Gaurav Balyan-> All the compiler errors have been resolved.(Please use node version <=12.22.1)* Add an edit user feature using the mock backend to edit the user's name and store a timestamp for each time the user is edited. You can implement this however you see fit and do not necessarily need to show the timestamps in the UI.
## Gaurav Balyan-> Edit user feature has been implemented and I have done it in a reusable and more maintainable way by reusing the add user feature and integrating edit within the already built component.* Add some tests throughout the application, including 3 - 5 tests in each of the existing pre-built test file as well as thoroughly testing all of your new functions (with new test files if needed).
## Gaurav Balyan-> I have added test coverage for all the component and services files in the application. Please view the coverage by running `ng test --code-coverage`This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.9.
## 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.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).