mirror of
https://github.com/status-im/status-react.git
synced 2025-02-13 03:16:55 +00:00
21 lines
526 B
Clojure
21 lines
526 B
Clojure
(ns utils.string-test
|
|
(:require
|
|
[cljs.test :refer [are deftest]]
|
|
utils.string))
|
|
|
|
(deftest get-initials-test
|
|
(are [expected input amount-initials]
|
|
(= expected (utils.string/get-initials input amount-initials))
|
|
"" nil 0
|
|
"" nil 1
|
|
"" "" 0
|
|
"" "ab" 0
|
|
"" "" 1
|
|
"A" "ab" 1
|
|
"A" " ab " 1
|
|
"A" "a b" 1
|
|
"A" "ab" 2
|
|
"AB" "a b" 2
|
|
"ABC" "a b c d" 3
|
|
"ABC" " a b c d" 3))
|