Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 527 Bytes

README.md

File metadata and controls

20 lines (16 loc) · 527 Bytes

Unit Testing

5 Step Method

  1. Decide tiny aspects and limitations (data requirements, responsibilities)
  2. Define input/output of aspects (data types, structures, results)
  3. Define function signatures (parameters, variants)
  4. Define test case for tiny aspects (including misuse and expected fails)
  5. Write code

JEST API

toStrictEqual // Type + Structure
toBe          // Prim itives, References
toEqual       // Deep/Recursive object equality
toBeTruthy    //
toBeFalsy     //
toBeCloseTo   // Float