mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
Add helper utility to convert name to path
This commit is contained in:
15
frontend/test/token_tests/token_core_test.cljs
Normal file
15
frontend/test/token_tests/token_core_test.cljs
Normal 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...."))))
|
||||
Reference in New Issue
Block a user