summaryrefslogtreecommitdiff
path: root/test/dompa
diff options
context:
space:
mode:
authorAsko Nõmm <asko@nmm.ee>2025-10-08 01:50:25 +0300
committerAsko Nõmm <asko@nmm.ee>2025-10-08 01:50:25 +0300
commited35b736e4098b3c7a5825674adcdd52ad577f89 (patch)
tree5e25b78c35af1f7951f82022444b5dd28cf1f9d8 /test/dompa
parentc05984198a00f249ea08792a813ed1d17c0e366d (diff)
Add test runner for cljs
Diffstat (limited to 'test/dompa')
-rw-r--r--test/dompa/coordinates_test.cljc8
-rw-r--r--test/dompa/html_test.cljc6
-rw-r--r--test/dompa/nodes_test.cljc11
3 files changed, 16 insertions, 9 deletions
diff --git a/test/dompa/coordinates_test.cljc b/test/dompa/coordinates_test.cljc
index 91abf20..85a4518 100644
--- a/test/dompa/coordinates_test.cljc
+++ b/test/dompa/coordinates_test.cljc
@@ -1,6 +1,8 @@
(ns dompa.coordinates-test
- (:require [clojure.test :refer [deftest testing is]]
- [dompa.coordinates :as coordinates]))
+ #?(:clj (:require [clojure.test :refer [deftest testing is]]
+ [dompa.coordinates :as coordinates]))
+ #?(:cljs (:require [cljs.test :refer-macros [deftest testing is]]
+ [dompa.coordinates :as coordinates])))
(deftest compose-test
(testing "Create coordinates"
@@ -142,4 +144,4 @@
(-> "<b>bold</b><img src=\"img.png\" />Hello, <span>wor<i>l<b>d</b></i></span>"
coordinates/compose
coordinates/unify
- coordinates/->nodes))))) \ No newline at end of file
+ coordinates/->nodes)))))
diff --git a/test/dompa/html_test.cljc b/test/dompa/html_test.cljc
index 0bab86e..77107d1 100644
--- a/test/dompa/html_test.cljc
+++ b/test/dompa/html_test.cljc
@@ -1,6 +1,8 @@
(ns dompa.html-test
- (:require [clojure.test :refer [deftest is testing]]
- [dompa.html :as html]))
+ #?(:clj (:require [clojure.test :refer [deftest is testing]]
+ [dompa.html :as html]))
+ #?(:cljs (:require [cljs.test :refer-macros [deftest testing is]]
+ [dompa.html :as html])))
(deftest coordinates-test
(testing "HTML to coordinates"
diff --git a/test/dompa/nodes_test.cljc b/test/dompa/nodes_test.cljc
index 1eba4ff..8544d51 100644
--- a/test/dompa/nodes_test.cljc
+++ b/test/dompa/nodes_test.cljc
@@ -1,7 +1,10 @@
(ns dompa.nodes-test
- (:require [clojure.test :refer [deftest is testing]]
- [dompa.nodes :refer [$ defhtml traverse ->html]]
- [dompa.html :as html]))
+ #?(:clj (:require [clojure.test :refer [deftest is testing]]
+ [dompa.nodes :refer [$ defhtml traverse ->html]]
+ [dompa.html :as html]))
+ #?(:cljs (:require [cljs.test :refer-macros [deftest testing is]]
+ [dompa.nodes :refer [$ defhtml traverse ->html]]
+ [dompa.html :as html])))
(defhtml hello [who]
($ :div
@@ -40,4 +43,4 @@
(is (= "<div>world hello</div>"
(-> (html/->nodes "<div>hello world</div>")
(traverse traverser-fn)
- ->html))))) \ No newline at end of file
+ ->html)))))