Add helper utility to convert name to path

This commit is contained in:
Florian Schroedl
2024-06-28 13:34:54 +02:00
parent 6da855c741
commit ef5f019200
3 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns token-tests.token-core-test
(:require
[app.main.ui.workspace.tokens.core :as wtc]
[cljs.test :as t :include-macros true]))
(t/deftest name->path-test
(t/is (= ["foo" "bar" "baz"] (wtc/name->path "foo.bar.baz")))
(t/is (= ["foo" "bar" "baz"] (wtc/name->path "foo..bar.baz")))
(t/is (= ["foo" "bar" "baz"] (wtc/name->path "foo..bar.baz...."))))