♻️ Change internal naming for PathData cljs impl

For make it more consistent with CLJ impl and move
the equals helper to buffers for make it reusable by
other binary types.
This commit is contained in:
Andrey Antukh
2025-05-28 14:18:57 +02:00
parent 580013bc3f
commit 3d61924162
5 changed files with 63 additions and 52 deletions

View File

@@ -101,7 +101,7 @@
(let [pdata (path/content sample-content)]
(t/is (= sample-bytes
(vec
#?(:cljs (js/Int8Array. (.-buffer pdata))
#?(:cljs (js/Int8Array. (.-buffer (.-buffer pdata)))
:clj (.array (.-buffer pdata))))))
(t/is (= sample-content
(vec pdata)))))

View File

@@ -18,6 +18,7 @@
(let [uuid (uuid/uuid "0227df82-63d7-8016-8005-48d9c0f33011")
result-bytes (uuid/get-bytes uuid)
expected-bytes [2 39 -33 -126 99 -41 -128 22 -128 5 72 -39 -64 -13 48 17]]
(t/testing "get-bytes"
(let [data (uuid/get-bytes uuid)]
(t/is (= (nth expected-bytes 0) (aget data 0)))