Fix --exclude option

Subtle annoying bug with symbol. Also allos multiple exclude options
This commit is contained in:
Gabriel Horner
2022-02-24 14:09:29 -05:00
committed by Andelf
parent 2a03753955
commit 50e5764369
4 changed files with 61 additions and 32 deletions

View File

@@ -75,24 +75,27 @@ yarn test
There are a couple different ways to develop with tests:
#### Focus Tests
Tests can be selectively run on the commandline using our own test runner which
provides the same test selection options as [cognitect-labs/test
runner](https://github.com/cognitect-labs/test-runner#invoke-with-clojure--m-clojuremain).
For this workflow:
1. Run `clj -M:test watch test` in one shell
2. Focus tests:
1. Add `^:focus` metadata flags to tests e.g. `(deftest ^:focus test-name ...)`.
2. In another shell, run `node static/tests.js -i focus` to only run those
tests. To run all tests except those tests run `node static/tests.js -e focus`.
3. Or focus namespaces: Using the regex option `-r`, run tests for `frontend.text-test` with `node static/tests.js -r text`.
For help on more options, run `node static/tests.js -h`.
#### Autorun Tests
To run tests automatically on file save, run `yarn
shadow-cljs watch test --config-merge '{:autorun true}'`. The test output may
appear where shadow-cljs was first invoked e.g. where `yarn watch` is running.
Specific namespace(s) can be auto run with the `:ns-regexp` option e.g. `npx
shadow-cljs watch test --config-merge '{:autorun true :ns-regexp
"frontend.text-test"}'`.
#### Focus Tests
Tests can be automatically compiled and then selectively run on the commandline
using our own test runner which emulates most of the options of [cognitect-labs/test
runner](https://github.com/cognitect-labs/test-runner#invoke-with-clojure--m-clojuremain).
For this workflow:
1. Run `clj -M:test watch test` in one shell
2. Focus tests or namespaces:
1. To focus test(s), add `^:focus` metadata flags. In another shell, run `node static/tests.js -i focus`
2. Alternatively, focus namespaces by using the regex option e.g. `node static/tests.js -r text` which runs tests for `frontend.text-test`.
For help on more focusing options, run `node static/tests.js -h`