Add test for custom.js to export_test.cljs

pull/10016/head
Candide U 2023-05-21 22:26:36 -04:00 committed by Tienson Qin
parent 2feddfe800
commit 2f091b4977
1 changed files with 10 additions and 0 deletions

View File

@ -97,6 +97,16 @@
(str (fs/readFileSync "tmp/published-graph/static/css/export.css")))
"export.css is copied correctly")))
(deftest-async create-export-with-js-files
(create-static-dir "tmp/static")
(create-logseq-graph "tmp/test-graph")
(fs/writeFileSync "tmp/test-graph/logseq/custom.js" "// foo")
(p/let [_ (create-export "tmp/static" "tmp/test-graph" "tmp/published-graph" {})]
(is (= "// foo"
(str (fs/readFileSync "tmp/published-graph/static/js/custom.js")))
"custom.js is copied correctly")))
(deftest-async create-export-with-assets
(create-static-dir "tmp/static")
(create-logseq-graph "tmp/test-graph")