       (is (= "/foo"
              (r/match->path (rf/match-by-name router ::foo))))
 
-      (is (= [{:type :warn
-               :message ["missing route" ::asd]}]
-             (:messages
-               (capture-console
-                 (fn []
-                   (rf/match-by-name! router ::asd))))))))
+      (testing "console warning about missing route"
+        (is (= [{:type :warn
+                 :message ["missing route" ::asd]}]
+               (:messages
+                 (capture-console
+                   (fn []
+                     (rf/match-by-name! router ::asd)))))))))
 
   (testing "schema coercion"
     (let [router (r/router ["/"

                                                 :query {(s/optional-key :mode) s/Keyword}}}]]
                           {:compile rc/compile-request-coercers
                            :data {:coercion rsc/coercion}})]
      (is (= (r/map->Match
               {:template "/:id"
                :path-params {:id "5"}

      (is (= "/5"
             (r/match->path (rf/match-by-name router ::foo {:id 5}))))

      (testing "query param is read"
        (is (= (r/map->Match
                 {:template "/:id"
                  :path-params {:id "5"}
                  ;; Note: query not included in path
                  :path "/5"
                  :parameters {:path {:id 5}
                               :query {:mode :foo}}})
               (m (rf/match-by-path router "/5?mode=foo"))))

        (is (= "/5?mode=foo"
               (r/match->path (rf/match-by-name router ::foo {:id 5}) {:mode :foo}))))

      (testing "fragment is ignored"
        (is (= (r/map->Match
                 {:template "/:id"
                  :path-params {:id "5"}
                  :path "/5"
                  :parameters {:path {:id 5}
                               :query {:mode :foo}}})
               (m (rf/match-by-path router "/5?mode=foo#fragment")))))

      (testing "console warning about missing params"
        (is (= [{:type :warn
                 :message ["missing path-params for route" ::foo
                           {:template "/:id"
                            :missing #{:id}
                            :required #{:id}
                            :path-params {}}]}]
               (:messages
                 (capture-console
                   (fn []
                     (rf/match-by-name! router ::foo {}))))))))))
