This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-29
Channels
- # admin-announcements (1)
- # announcements (20)
- # babashka (43)
- # beginners (134)
- # calva (2)
- # clerk (7)
- # cljdoc (9)
- # clojars (8)
- # clojure (91)
- # clojure-europe (21)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-uk (1)
- # clojurescript (5)
- # datahike (3)
- # docker (2)
- # emacs (6)
- # fulcro (7)
- # graphql (9)
- # honeysql (24)
- # improve-getting-started (5)
- # introduce-yourself (1)
- # lambdaisland (1)
- # luminus (3)
- # malli (3)
- # nbb (19)
- # off-topic (22)
- # pathom (1)
- # portal (3)
- # practicalli (1)
- # rdf (26)
- # reagent (29)
- # reitit (9)
- # shadow-cljs (15)
- # spacemacs (3)
- # sql (4)
- # tools-build (30)
- # xtdb (41)
just ported cognitect-labs/test-runner
to nbb https://github.com/nextjournal/nbb-test-runner
mk@mkair ~/d/nbb-test-runner (master)> yarn nbb -m nextjournal.test-runner --test-help
yarn run v1.22.19
$ /Users/mk/dev/nbb-test-runner/node_modules/.bin/nbb -m nextjournal.test-runner --test-help
USAGE:
clj -m nextjournal.test-runner <options>
-d, --dir DIRNAME Name of the directory containing tests. Defaults to "test".
-n, --namespace SYMBOL Symbol indicating a specific namespace to test.
-r, --namespace-regex REGEX Regex for namespaces to test.
-v, --var SYMBOL Symbol indicating the fully qualified name of a specific test.
-i, --include KEYWORD Run only tests that have this metadata keyword.
-e, --exclude KEYWORD Exclude tests with this metadata keyword.
-H, --test-help Display this help message
All options may be repeated multiple times for a logical OR effect.
If neither -n nor -r is supplied, use -r #".*-test$" (ns'es ending in '-test')
✨ Done in 0.23s.
Nice! Look forward to trying this out. I have enough nbb tests that I'd love to swap in a test runner
@U08ALHZ2N let me know how it goes for you
Sure. Looks like it depends on the glob lib. One weakness of the current nbb.edn approach is all consumers of a nbb.edn have to add those npm libs locally. When I have time I could rewrite the glob/sync with native node libs if you'd like
yeah, that would be nice, PR very welcome. I just pasted the code from the glob example in nbb.
@U5H74UNSF Afternoon. Replaced glob and fixed async issues with https://github.com/nextjournal/nbb-test-runner/pull/1
@U08ALHZ2N excellent, thank you!
Great! If you'd ever need a CLI for the runner, happy to add one. Added one for nbb-logseq as described at https://github.com/logseq-cldwalker/nbb-test-runner/tree/add-cli#cli. It's handy for quickly running tests on small nbb-compatible, cljs repos with no deps
For example, I was able to pull up to https://github.com/logseq/logseq/tree/master/deps/common which uses cljs-test-runner and was able to run the test suite instantly. So much better than waiting for cljs-test-runner or even its watch mode
Thank you very much for nbb-test-runner
@U0516053R thank you, glad to hear you find it useful