Răsfoiți Sursa

script to test classnames in tests

Adam Shaw 6 ani în urmă
părinte
comite
fc1e79fcef
1 a modificat fișierele cu 10 adăugiri și 0 ștergeri
  1. 10 0
      scripts/bad-test-classnames.sh

+ 10 - 0
scripts/bad-test-classnames.sh

@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+# the quote craziness in the regex is simply to get ['"]
+find packages*/__tests__/src -type f -not -name '*Wrapper.*' -not -name '*.tsx' -print0 | xargs -0 \
+  grep --color=auto -E 'fc\-'
+
+  # to search for ALL selectors...
+  # '(\$|find|querySelector|querySelectorAll)\(['"'"'"]'
+
+# afterwards, manually search for '.fc' (making regex was too hard)