Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.15 KB

File metadata and controls

40 lines (28 loc) · 1.15 KB

Angular Unit Testing Practice

A simple Angular project created to practice and learn unit testing using Jasmine and Karma. Includes basic components with corresponding unit tests covering component logic, DOM interaction, service integration, and input/output bindings.

Purpose

This project is intended for learning and experimenting with unit testing in Angular. It demonstrates best practices for writing clean, effective tests for components and services.

Features

Unit tests for:

  • DOM rendering
  • Input/Output bindings
  • Event handling
  • Service method mocking

Jasmine & Karma setup out-of-the-box

Written with Angular CLI & TestBed utilities

Project Setup

Clone the Repo

Install Dependencies

  • npm install

Run the Application

  • ng serve

Run Unit Tests

  • ng test

Notes

  • Tests are written using TestBed, fixture.debugElement, and mocking with spyOn().
  • Components are kept simple to focus on learning test structure and logic.

Contributions

This project is for educational/demo purposes. Thanks for checking it out!