Skip to content

Commit

Permalink
Add test for custom.js to export_test.cljs
Browse files Browse the repository at this point in the history
  • Loading branch information
candideu authored and logseq-cldwalker committed May 22, 2023
1 parent a2cf976 commit fd8bb11
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deps/publishing/test/logseq/publishing/export_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit fd8bb11

Please sign in to comment.