Skip to content

A UserListing application that fully incorporate and demystifies Angular unit testing using Jasmine

Notifications You must be signed in to change notification settings

pkErbynn/demystify

Repository files navigation

Demystify

Demystify is a web-based application to demonstrate and demystify Angular unit testing.

Screenshot:

File structure:

demystify
    |____ src/
    |       |___ app/
    |       |      |___components/
    |       |      |        |___ user-list/
    |       |      |                 |___ user-list.component.css
    |       |      |                 |___ user-list.component.html
    |       |      |                 |___ user-list.component.spec.ts
    |       |      |                 |___ user-list.component.ts
    |       |      |___interfaces/
    |       |      |        |___ user.ts
    |       |      |___services/
    |       |               |___ user.service.mocking-bird.spec.ts
    |       |               |___ user.service.spec.ts
    |       |               |___ user.service.ts
    |       |___ app-routing.module.ts
    |       |___ app.component.css
    |       |___ app.component.html
    |       |___ app.component.spec.ts
    |       |___ app.component.ts
    |       |___ app.module.ts
    |       |___ assets/
    |              |___ images/
    |___ package.json
    |___ README.md
    |___ ...

This project was generated with Angular CLI version 11.1.2.

Technologies

  • Karma
  • Jasmine framework
  • ts-mocking-bird library

Usage

  1. Clone this repository
$ git clone https://github.com/pkErbynn/demystify.git
  1. Navigate to the root directory
$ cd /demystify
  1. Run the following command to serve the application locally.
 $ ng serve --open

Running unit tests

Run this command to execute the unit tests via Karma.

$ ng test

Service testing result (using Jasmine & ts-mocking-bird):

Component testing result (using Jasmine):

All test result (from both service and component):

Thank you :)

About

A UserListing application that fully incorporate and demystifies Angular unit testing using Jasmine

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published