From c3dad87afbf67d5e585a4dafc1404597b5cf2575 Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Fri, 12 May 2023 23:44:49 -0400 Subject: [PATCH] Good tests --- content/notes/good-tests/index.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 content/notes/good-tests/index.md diff --git a/content/notes/good-tests/index.md b/content/notes/good-tests/index.md new file mode 100644 index 0000000..90dc67f --- /dev/null +++ b/content/notes/good-tests/index.md @@ -0,0 +1,17 @@ +--- +title: "Good Tests" +date: 2023-05-12T23:40:19-04:00 +draft: false +--- + +* Most importantly: **give you confidence to make changes** +* You need proper end-to-end testing + * Set up your data (fresh per test) + * Visit a page + * Interact with it + * Make assertions about the results +* Put complex logic into easily testable objects/functions +* Create stub objects to stand in for network calls + * Use JSON Schema to ensure stub stays in sync + +{{}}