thheller / thheller/shadow-cljs
Feature request: focus on tests
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 2.4k
- Forks
- 192
- Avg merge
- 3h 11m
- Merged PRs (30d)
- 1
Description
Would it be possible for the test runners to allow focusing on single tests?
What I have in mind is similar to what lein-test-refresh does: https://github.com/jakemcc/lein-test-refresh#built-in-test-narrowing-test-selector. You mark one or more tests with a metadata flag, and then only those get executed.
I think that it should be possible to build this into https://github.com/thheller/shadow-cljs/blob/8169e663c0338ab01b31726b0cfcd7005563c581/src/main/shadow/test/env.clj, but I think it should be activated by a parameter so that you don't accidentally forget a focus mark and disable most tests of an automatic pipeline.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/main/shadow/test/env.clj and compare the requested behavior with lein-test-refresh's test selector. Determine how a parameter should activate metadata-based focus selection without changing the default test run. Done means one or more marked tests run only when explicitly enabled, while automatic pipelines still execute the full suite by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100