                        ["/api" {:name ::api
                                 :middleware [mw1 mw2 mw3 mw2]
                                 :handler handler}])
-              app (->app router)]
+              app (create-app router)]
 
           (is (= [::mw1 ::mw3 :ok ::mw3 ::mw1] (app "/api")))
 

            (dotimes [_ 10]
              (is (= :request (app :request))))))))))

(deftest middleware-handler-test

  (testing "all paths should have a handler"

                     ["/ping" handler]
                     ["/admin" {:middleware [[mw :admin]]}
                      ["/ping" handler]]]])
          app (create-app router)]

      (testing "not found"
        (is (= nil (app "/favicon.ico"))))
