add webmcp
CI / Test + coverage (push) Successful in 59s

This commit is contained in:
2026-09-19 13:38:27 -09:00
parent aa4f8ea86a
commit 5aaf5a8d6c
12 changed files with 1919 additions and 17 deletions
+10
View File
@@ -22,6 +22,16 @@
(testing "HEAD is served like GET, without a body"
(is (= 200 (:status (request :head "/"))))))
(deftest origin-trial-header-test
(let [get-root (fn [config]
((core/make-app config) {:request-method :get :uri "/" :headers {}}))]
(testing "the WebMCP origin-trial token is sent as an Origin-Trial header on the page"
(is (= "tok-123" (get-in (get-root (assoc core/config :webmcp {:origin-trial-token "tok-123"}))
[:headers "Origin-Trial"]))))
(testing "no token, no header"
(is (nil? (get-in (get-root (assoc core/config :webmcp {:origin-trial-token nil}))
[:headers "Origin-Trial"]))))))
(deftest js-assets-test
;; main.js only exists once script/ui-build has run, so only the miss is asserted here;
;; the integration suite (which runs against the built image) checks the hit.