Skip to content

Commit c4596ae

Browse files
ericdalloeca-agent
andcommitted
Fix unbound match? in integration test helper
`match?` from matcher-combinators.test is a declared symbol used only as a compile-time assert-expr inside `(is ...)`. Using it inside an anonymous function passed to `some` causes a runtime call to the unbound var, which fails in native image builds. Replace with direct `matcher-combinators.core/match` + `indicates-match?` calls for the runtime predicate in `match-contents-unordered`. 🤖 Generated with [eca](https://eca.dev) Co-Authored-By: eca-agent <git@eca.dev>
1 parent a27230e commit c4596ae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

integration-test/integration/helper.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[clojure.string :as string]
66
[clojure.test :refer [is]]
77
[integration.eca :as eca]
8+
[matcher-combinators.core :as mc]
89
[matcher-combinators.test :refer [match?]]))
910

1011
(def windows?
@@ -80,7 +81,10 @@
8081
actuals (mapv (fn [_] (eca/client-awaits-server-notification :chat/contentReceived))
8182
(range n))]
8283
(doseq [[chat-id role content] specs]
83-
(is (some #(match? {:chatId chat-id :role role :content content} %) actuals)
84+
(is (some (fn [actual]
85+
(mc/indicates-match?
86+
(mc/match {:chatId chat-id :role role :content content} actual)))
87+
actuals)
8488
(str "Expected a notification with role=" role
8589
" content=" content
8690
" but none of the " n " received matched")))))

0 commit comments

Comments
 (0)