From f130bdb7d4958b64489e762eae11aa8e0c4c939d Mon Sep 17 00:00:00 2001 From: Marc O'Morain Date: Tue, 7 Dec 2021 22:17:40 +0000 Subject: [PATCH 1/2] Use test-var-query for all test commands Remove use of deprecated Cider commands, in favour of the supported test-var-query. This fixes an issue with cljc conditionals impacting the ability to run tests. Fixes: #1328 --- src/nrepl/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/nrepl/index.ts b/src/nrepl/index.ts index 38d700cea..bd15bc46f 100644 --- a/src/nrepl/index.ts +++ b/src/nrepl/index.ts @@ -447,7 +447,13 @@ export class NReplSession { return new Promise((resolve, reject) => { let id = this.client.nextId; this.messageHandlers[id] = resultHandler(resolve, reject); - this.client.write({ op: "test-all", id, session: this.sessionId, "load?": true }); + this.client.write({ + op: "test-var-query", id, session: this.sessionId, "var-query": { + "ns-query": { + 'test?': true + } + } + }); }) } From 564c0dcadf1adef4c18c1bf64810aa49fe967bc9 Mon Sep 17 00:00:00 2001 From: Marc O'Morain Date: Thu, 9 Dec 2021 21:43:43 +0000 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47a287488..35baf14c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Changes to Calva. ## [Unreleased] - Fix: [Babashka Jack-In REPL doesn't show eval errors](https://github.com/BetterThanTomorrow/calva/issues/1413) - [Inform about conflict with the Clojure extension](https://github.com/BetterThanTomorrow/calva/issues/1427) +- Fix: [Run All Tests command doesn't run tests in .cljc file with reader conditional in ns](https://github.com/BetterThanTomorrow/calva/issues/1328). ## [2.0.228] - 2021-12-02