Add Resource Loader SPA and JS test harness
All checks were successful
Build Org Website / build (push) Successful in 38s
All checks were successful
Build Org Website / build (push) Successful in 38s
This commit is contained in:
@@ -259,6 +259,32 @@
|
||||
(let* ((info (list :input-file temp-file))
|
||||
(output "\\documentclass{article}")
|
||||
(result (z/org-html-add-body-classes output 'latex info)))
|
||||
(should (string= output result))))))
|
||||
(should (string= output result))))))
|
||||
|
||||
;; ── Resource Loader SPA ─────────────────────────────────────────────────────
|
||||
|
||||
(ert-deftest test/resource-loader-assets-registered ()
|
||||
"The Resource Loader's loaders should be present in the shared head."
|
||||
(should (string-match-p "pages/resource-loader\\.css" z/shared-head))
|
||||
(should (string-match-p "pages/resource-loader-model\\.js" z/shared-head))
|
||||
(should (string-match-p "pages/resource-loader\\.js" z/shared-head)))
|
||||
|
||||
(ert-deftest test/resource-loader-publishes-with-site-shell ()
|
||||
"The /rl source should publish with the normal preamble and postamble."
|
||||
(let ((html
|
||||
(with-temp-buffer
|
||||
(insert-file-contents (site-path "rl/index.org"))
|
||||
(setq-local buffer-file-name (site-path "rl/index.org"))
|
||||
(org-mode)
|
||||
(org-export-as
|
||||
'z-html nil nil nil
|
||||
(list :html-preamble z/preamble
|
||||
:html-postamble z/postamble
|
||||
:html-head z/shared-head
|
||||
:with-toc nil
|
||||
:section-numbers nil)))))
|
||||
(should (string-match-p "id=\"resource-loader\"" html))
|
||||
(should (string-match-p "class=\"banner-header\"" html))
|
||||
(should (string-match-p "<footer>" html))))
|
||||
|
||||
;;; build-site-tests.el ends here
|
||||
|
||||
Reference in New Issue
Block a user