Use cl-str instead
This commit is contained in:
parent
53a6a8f50e
commit
7ce7751900
6 changed files with 26 additions and 34 deletions
|
@ -89,6 +89,7 @@
|
|||
nil
|
||||
"bar")))
|
||||
:pretty t))))
|
||||
|
||||
(testing "self-closing-tag"
|
||||
(ok (string= "<img src=\"/background.png\">"
|
||||
(render-to-string (create-element :img
|
||||
|
@ -137,7 +138,18 @@
|
|||
(create-element :li
|
||||
nil
|
||||
(list "brah"))))
|
||||
:pretty t))))))
|
||||
:pretty t)))))
|
||||
|
||||
(testing "minify-props-text"
|
||||
(let ((elm (create-element :div
|
||||
'(:x-data "{
|
||||
open: false,
|
||||
get isOpen() { return this.open },
|
||||
toggle() { this.open = ! this.open },
|
||||
}")
|
||||
nil)))
|
||||
(ok (string= (render-to-string elm)
|
||||
"<div x-data=\"{ open: false, get isOpen() { return this.open }, toggle() { this.open = ! this.open }, }\"></div>")))))
|
||||
|
||||
(defun comp1 (&key prop children)
|
||||
(create-element :div
|
||||
|
|
|
@ -11,16 +11,7 @@
|
|||
|
||||
(testing "escape-html-text-content"
|
||||
(ok (string= "&<>"'/`="
|
||||
(escape-html-text-content "&<>\"'/`="))))
|
||||
|
||||
(testing "minify"
|
||||
;; Test with Alpine.js
|
||||
(ok (string= (minify "{
|
||||
open: false,
|
||||
get isOpen() { return this.open },
|
||||
toggle() { this.open = ! this.open },
|
||||
}")
|
||||
"{ open: false, get isOpen() { return this.open }, toggle() { this.open = ! this.open }, }"))))
|
||||
(escape-html-text-content "&<>\"'/`=")))))
|
||||
|
||||
(defgroup fruit
|
||||
apple banana)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue