Introduction

What is Unit Test A test of a single "unit" of a code.

Good Unit Test

  • Fast
  • Cheap to Write
  • Single State Change
  • Assert 1 Thing
  • Doesn't Cross Process Boundaries
  • Reliable

AAA

  • Arrange
  • Act
  • Search

A good test can have some duplication code, That tells the story

JASMINE

  • describe()
  • beforeEach()
  • it()
  • expect()
  • Matchers
    • toBe()
    • toContain()
    • toBeDefined()

There are two type of unit test in angular 2 ( Isolated, Integrated)

results matching ""

    No results matching ""