Skip to main content

Posts

Showing posts with the label What Are Isolated Unit Tests?

Isolated Unit Tests vs. Angular Testing Utilities - [Angular 4 and Angular 2]

What Are Isolated Unit Tests? The Isolated unit tests check-up an instance of a class itself without using any Angular dependence or any injected values. Mostly application tester creates a test instance of the class with new keyword and supplying test doubles for the constructor parameters and then investigation the test instance. The isolated unit tests don't realize how components interact with Angular and also don't realize how a component class interacts with its own template or components. For testing Angular Pipes and Services - we should write isolated unit tests! The isolated unit tests don't realize how components interact with Angular and also don't realize how a component class interacts with its own template or components. Stayed Informed  -  Angular 4 Docs with Examples The most familiar Unit Test for the Tester and Developers as following - 1.      Create an Instances directly with new keyword 2.  ...

What Are Angular Testing Utilities? [Angular 4 and Angular 2]

The Angular Testing utilities include the TestBed class and helper functions from the test libraries - @angular/core/testing. The TestBed class is one of the principal Angular testing utilities! The TestBed class is responsible for configuring and initializing the environment that we are going to write our tests in by calling TestBed.configureTestingModule. Stayed Informed  -  Angular 2 Docs with Examples Stayed Informed  -  Angular 4 Docs with Examples The TestBed.configureTestingModule is used to define the environment that we want our component under test to live in. The Angular Testing utility APIs are – 1.      getTestBed 2.      async 3.      fakeAsync 4.      tick 5.      inject 6.      discardPeriodicTasks 7.      flushMicrotasks 8.      ComponentFixtureAu...

What Are Isolated Unit Tests? [Angular 4 and Angular 2]

What Are Isolated Unit Tests? The Isolated unit tests check-up an instance of a class itself without using any Angular dependence or any injected values. Mostly application tester creates a test instance of the class with new keyword and supplying test doubles for the constructor parameters and then investigation the test instance. The isolated unit tests don't realize how components interact with Angular and also don't realize how a component class interacts with its own template or components. For testing Angular Pipes and Services - we should write isolated unit tests! The isolated unit tests don't realize how components interact with Angular and also don't realize how a component class interacts with its own template or components. Stayed Informed - Angular 2 Docs with Examples Stayed Informed  - Angular 4 Docs with Examples The most familiar Unit Test for the Tester and Developers as following - 1.      Create an Instanc...