Gaurav-Balyan / HRS-Challenge

A project in which there is explanation about how to do unit testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 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.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

About

A project in which there is explanation about how to do unit testing


Languages

Language:TypeScript 87.8%Language:HTML 9.1%Language:JavaScript 3.0%Language:SCSS 0.1%