mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 03:28:28 +02:00
Move to tokens ns, add test
This commit is contained in:
parent
cf07de3bcf
commit
5cef23267c
3 changed files with 16 additions and 17 deletions
|
@ -37,6 +37,13 @@
|
|||
(t/is (= ["foo" "bar" "baz"] (wtt/token-name->path "foo..bar.baz")))
|
||||
(t/is (= ["foo" "bar" "baz"] (wtt/token-name->path "foo..bar.baz...."))))
|
||||
|
||||
(t/deftest tokens-name-map-test
|
||||
(t/testing "creates a a names map from tokens"
|
||||
(t/is (= {"border-radius.sm" {:name "border-radius.sm", :value "10"}
|
||||
"border-radius.md" {:name "border-radius.md", :value "20"}}
|
||||
(wtt/token-names-map [{:name "border-radius.sm" :value "10"}
|
||||
{:name "border-radius.md" :value "20"}])))))
|
||||
|
||||
(t/deftest tokens-name-tree-test
|
||||
(t/is (= {"foo"
|
||||
{"bar"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue