Continuing what I started with tests, https://github.com/babashka/sci.configs/blob/64342798713d355244d86ee6c311725d0c58e682/src/sci/configs/cljs/test.cljs#L1077, it doesn't seem like that is working as expected. The raw all-ns value is:
"gracie.projects2" "cljs-bean.core" "tests.cli" "user" "promesa.protocols" "nbb.core" "promesa.core" "nbb.classpath" "edamame.core" "framework.env" "cljs.test" "goog.object" "babashka.cli" "clojure.core" "clojure.set" "framework.queue" "cljs.pprint" "clojure.main" "nbb.error" "gracie.queue" "clojure.edn" "notion.api" "tests.gracie.test-queue" "clojure.repl" "clojure.string" "framework.utils" "sci.core" "cljs.reader" "clojure.walk" "clojure.template")
Then trying to use (t/run-all-tests #"tests\.gracie") should match tests.gracie.test-queue
However, that always returns an empty list. That can be reproduced in the repl by manually filtering the results of (all-ns)
If I replace re-matches with re-find, then it works
this code comes from here: https://github.com/clojure/clojurescript/blob/0a5f5edcc1c00eecceb6d32c478e66083a30503b/src/main/cljs/cljs/test.cljc#L334
Interesting!
I don't think your PR is the correct one either
It's better to test nbb in combination of sci.configs with :local/root checkout
I think (all-ns) should be (map str (keys (all-ns))) and then just apply re-matches over those strings
PR welcome, if you can verify that this works
else I'll do it tomorrow
Actually it might be working, seems re-matches requires the pattern to match the full string
Yes! That was it, itโs working correctly now with a pattern that matches the full string
ah right
good to know :)