lambdaisland / kaocha

Full featured next gen Clojure test runner
https://cljdoc.org/d/lambdaisland/kaocha/1.0.861/doc/1-introduction
Eclipse Public License 1.0
792 stars 81 forks source link

Load namespaces first required with :as-alias #392

Closed alysbrooks closed 1 year ago

alysbrooks commented 1 year ago

Ensure libs are loaded (and don't just have an alias) before skipping them in our loading code in kaocha.ns. Fixes #390.

alysbrooks commented 1 year ago

We could possibly skip the test and just use require, since require doesn't reloaded already existing namespaces, or just use the check I added (with loaded-ns). But I don't know the rationale for not just using require and this seems the best way to get the fix out.

codecov[bot] commented 1 year ago

Codecov Report

Base: 75.54% // Head: 56.68% // Decreases project coverage by -18.86% :warning:

Coverage data is based on head (42ed542) compared to base (78f09a8). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #392 +/- ## =========================================== - Coverage 75.54% 56.68% -18.86% =========================================== Files 51 51 Lines 2772 2773 +1 Branches 260 217 -43 =========================================== - Hits 2094 1572 -522 - Misses 519 1032 +513 - Partials 159 169 +10 ``` | Flag | Coverage Δ | | |---|---|---| | integration | `56.68% <100.00%> (+0.05%)` | :arrow_up: | | unit | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/kaocha/ns.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS9ucy5jbGo=) | `100.00% <100.00%> (ø)` | | | [src/kaocha/random.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS9yYW5kb20uY2xq) | `25.00% <0.00%> (-75.00%)` | :arrow_down: | | [src/kaocha/version\_check.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS92ZXJzaW9uX2NoZWNrLmNsag==) | `37.50% <0.00%> (-62.50%)` | :arrow_down: | | [src/kaocha/config.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS9jb25maWcuY2xq) | `29.94% <0.00%> (-61.59%)` | :arrow_down: | | [src/kaocha/watch.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS93YXRjaC5jbGo=) | `12.44% <0.00%> (-59.23%)` | :arrow_down: | | [src/kaocha/history.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS9oaXN0b3J5LmNsag==) | `56.00% <0.00%> (-36.00%)` | :arrow_down: | | [src/kaocha/plugin/gc\_profiling.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS9wbHVnaW4vZ2NfcHJvZmlsaW5nLmNsag==) | `9.09% <0.00%> (-28.58%)` | :arrow_down: | | [src/kaocha/plugin/profiling.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS9wbHVnaW4vcHJvZmlsaW5nLmNsag==) | `9.37% <0.00%> (-26.57%)` | :arrow_down: | | [src/kaocha/runner.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS9ydW5uZXIuY2xq) | `24.06% <0.00%> (-23.31%)` | :arrow_down: | | [src/kaocha/assertions.clj](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2thb2NoYS9hc3NlcnRpb25zLmNsag==) | `20.00% <0.00%> (-22.86%)` | :arrow_down: | | ... and [23 more](https://codecov.io/gh/lambdaisland/kaocha/pull/392?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

alysbrooks commented 1 year ago

Note to self: I should add a test before merging this.

alysbrooks commented 1 year ago

I don't want to delay releasing this fix anymore, so I'm going to go ahead and merge it without tests.