mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 22:49:53 +00:00
fix: create default pages for test db
This commit is contained in:
@@ -89,9 +89,11 @@
|
||||
(defn start!
|
||||
([repo]
|
||||
(start! repo {}))
|
||||
([repo {:keys [listen-handler]}]
|
||||
([repo {:keys [listen-handler create-default-pages?]
|
||||
:or {create-default-pages? false}}]
|
||||
(let [db-name (datascript-db repo)
|
||||
db-conn (ldb/start-conn :schema (get-schema repo) :create-default-pages? false)]
|
||||
db-conn (ldb/start-conn :schema (get-schema repo)
|
||||
:create-default-pages? create-default-pages?)]
|
||||
(swap! conns assoc db-name db-conn)
|
||||
(when listen-handler
|
||||
(listen-handler repo)))))
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
(let [test-db (if (or (:db-graph? opts) (some? js/process.env.DB_GRAPH))
|
||||
test-db-name-db-version
|
||||
test-db-name)]
|
||||
(conn/start! test-db opts)))
|
||||
(conn/start! test-db (assoc opts :create-default-pages?
|
||||
(get :create-default-pages? opts true)))))
|
||||
|
||||
(defn destroy-test-db!
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user