Skip to content

seagomezar/ng-col-angular-ut

Repository files navigation

NgColombia Workshop

Write powerful Unit Tests with Angular Test Bed

In this workshop we will learn and practice how to write effective unit tests, covering the fundamentals of the Angular TestBed API and see how writing unit tests in Angular can change our development life. We also will understand the deploy process of a typical Angular application and what is the part of the unit tests over there. The plan for the workshop is, we will cover what is a unit test how to bring them into Angular, then we will see what is the Angular TestBed and how never forget the how to write a test in Angular. Also, we will see how to test providers and components and We will meet the "Do-it-yourself Angular Test framework to facilitate your development life. Next, we will introduce TDD and we can deep into Karma/Jasmine to definitely you be on the road. Finally, you will find the test to be sure you learned all you need.

1. Install Node, NPM and the Angular CLI

  • Use the latest version of Node or make sure you are using version 8.0.0 or above
  • Install NPM (It generally comes with Node, so no worries) 😙
  • Install Angular CLI globally
    • $ npm install @angular/cli -g

2. Verify

Make sure the installation went well by running:

  • $ node -v -> Version 9.11.1 or above
  • $ npm -v -> Version 6.2.0 or above
  • $ ng -v-> Version 6.1.1 or above

3. You are ready! Let's create an app

  • Create a new application with:
    • $ ng new myProject (it should take a few minutes) ⏰
  • Enter your application folder with:
    • $ cd myProject
  • Serve your new application in the browser:
    • $ ng serve
  • Run the empty test suite:
    • $ ng test
  • If you see: "App Works", you are done! 🎉🎉🎉

You are ready to go to Branch #1

About

Write powerful unit tests with Angular TestBed - Repository for the Workshop in NgColombia

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published