Skip to content

Instantly share code, notes, and snippets.

View ethanneff's full-sized avatar

Ethan Neff ethanneff

View GitHub Profile

Testing Importance Hierarchy

  1. ✅ business logic in pure functions
  2. ✅ business logic in custom hooks
  3. ✅ behavior logic in components
  4. ✅ end to end tests
  5. ✅ unit tests
  6. ⚠️ UI tests
  7. 🛑 snapshot tests
  8. 🛑 static tests

Frontend Testing Examples

Testing UI

Component

import React from "react";
import logo from "./logo.svg";