Skip to content

TDD + BDD testing + tools - Playground + Experiments

Notifications You must be signed in to change notification settings

TheRemoteCoder/Unit-Testing-Playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4b5f74d · Feb 1, 2021

History

39 Commits
Jan 26, 2021
Jan 26, 2021
Jan 29, 2021
Feb 1, 2021
Jan 25, 2021
Feb 1, 2021
Jan 25, 2021
Jan 25, 2021
Jan 26, 2021
Jan 26, 2021
Jan 26, 2021
Jan 26, 2021
Feb 1, 2021
Feb 1, 2021

Repository files navigation

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