fixed cljs tests

This commit is contained in:
jem 2021-11-06 17:29:13 +01:00
parent d5e3810d02
commit 0fc9fc3e65
4 changed files with 18 additions and 5 deletions

View file

@ -1,7 +1,8 @@
(ns dda.c4k-common.common (ns dda.c4k-common.common
(:require (:require
[clojure.walk] [clojure.walk]
[orchestra.core :refer [defn-spec]] #?(:clj [orchestra.core :refer [defn-spec]]
:cljs [orchestra.core :refer-macros [defn-spec]])
[dda.c4k-common.predicate :as cp])) [dda.c4k-common.predicate :as cp]))

View file

@ -1,10 +1,12 @@
(ns dda.c4k-common.yaml-test (ns dda.c4k-common.yaml-test
(:require (:require
[clojure.test :refer [deftest is are testing run-tests]] [clojure.test :refer [deftest is are testing run-tests]]
[orchestra.spec.test :as st] [clojure.spec.test.alpha :as st]
[dda.c4k-common.yaml :as cut])) [dda.c4k-common.yaml :as cut]))
(st/instrument) (st/instrument `cut/from-string)
(st/instrument `cut/to-string)
(st/instrument `cut/dispatch-by-resource-name)
(deftest should-dispatch-by-resource-name (deftest should-dispatch-by-resource-name
(is (= :clj (is (= :clj

View file

@ -2,10 +2,15 @@
(:require (:require
#?(:clj [clojure.test :refer [deftest is are testing run-tests]] #?(:clj [clojure.test :refer [deftest is are testing run-tests]]
:cljs [cljs.test :refer-macros [deftest is are testing run-tests]]) :cljs [cljs.test :refer-macros [deftest is are testing run-tests]])
[orchestra.spec.test :as st] [clojure.spec.test.alpha :as st]
[dda.c4k-common.postgres :as cut])) [dda.c4k-common.postgres :as cut]))
(st/instrument) (st/instrument `cut/generate-config)
(st/instrument `cut/generate-deployment)
(st/instrument `cut/generate-persistent-volume)
(st/instrument `cut/generate-pvc)
(st/instrument `cut/generate-secret)
(st/instrument `cut/generate-service)
(deftest should-generate-config (deftest should-generate-config
(is (= {:postgres-db "postgres" (is (= {:postgres-db "postgres"

View file

@ -2,8 +2,13 @@
(:require (:require
[cljs.test :refer-macros [deftest is are testing run-tests]] [cljs.test :refer-macros [deftest is are testing run-tests]]
[shadow.resource :as rc] [shadow.resource :as rc]
[clojure.spec.test.alpha :as st]
[dda.c4k-common.yaml :as cut])) [dda.c4k-common.yaml :as cut]))
(st/instrument `cut/from-string)
(st/instrument `cut/to-string)
(st/instrument `cut/dispatch-by-resource-name)
(defmethod cut/load-resource :test [resource-name] (defmethod cut/load-resource :test [resource-name]
(case resource-name (case resource-name
"test/ingress_test.yaml" (rc/inline "test/ingress_test.yaml") "test/ingress_test.yaml" (rc/inline "test/ingress_test.yaml")