Skip to content

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

Notifications You must be signed in to change notification settings

EduKeyPath/Angular_Unit_Test_Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published