mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 13:28:27 +02:00
♻️ Make the namespacing independent of the branding.
This commit is contained in:
parent
aaf8b71837
commit
6c67c3c71b
305 changed files with 2399 additions and 2580 deletions
Before Width: | Height: | Size: 305 KiB After Width: | Height: | Size: 305 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -1,4 +1,4 @@
|
|||
(ns uxbox.tests.helpers
|
||||
(ns app.tests.helpers
|
||||
(:require
|
||||
[clojure.java.io :as io]
|
||||
[clojure.spec.alpha :as s]
|
||||
|
@ -7,49 +7,49 @@
|
|||
[cuerdas.core :as str]
|
||||
[mount.core :as mount]
|
||||
[environ.core :refer [env]]
|
||||
[uxbox.common.pages :as cp]
|
||||
[uxbox.services.init]
|
||||
[uxbox.services.mutations.profile :as profile]
|
||||
[uxbox.services.mutations.projects :as projects]
|
||||
[uxbox.services.mutations.teams :as teams]
|
||||
[uxbox.services.mutations.files :as files]
|
||||
[uxbox.services.mutations.pages :as pages]
|
||||
[uxbox.services.mutations.colors :as colors]
|
||||
[uxbox.migrations]
|
||||
[uxbox.media]
|
||||
[uxbox.media-storage]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.util.blob :as blob]
|
||||
[uxbox.common.uuid :as uuid]
|
||||
[uxbox.util.storage :as ust]
|
||||
[uxbox.config :as cfg])
|
||||
[app.common.pages :as cp]
|
||||
[app.services.init]
|
||||
[app.services.mutations.profile :as profile]
|
||||
[app.services.mutations.projects :as projects]
|
||||
[app.services.mutations.teams :as teams]
|
||||
[app.services.mutations.files :as files]
|
||||
[app.services.mutations.pages :as pages]
|
||||
[app.services.mutations.colors :as colors]
|
||||
[app.migrations]
|
||||
[app.media]
|
||||
[app.media-storage]
|
||||
[app.db :as db]
|
||||
[app.util.blob :as blob]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.util.storage :as ust]
|
||||
[app.config :as cfg])
|
||||
(:import org.postgresql.ds.PGSimpleDataSource))
|
||||
|
||||
(defn testing-datasource
|
||||
[]
|
||||
(doto (PGSimpleDataSource.)
|
||||
(.setServerName "postgres")
|
||||
(.setDatabaseName "uxbox_test")
|
||||
(.setUser "uxbox")
|
||||
(.setPassword "uxbox")))
|
||||
(.setDatabaseName "app_test")
|
||||
(.setUser "app")
|
||||
(.setPassword "app")))
|
||||
|
||||
(defn state-init
|
||||
[next]
|
||||
(let [config (cfg/read-test-config env)]
|
||||
(try
|
||||
(let [pool (testing-datasource)]
|
||||
(-> (mount/only #{#'uxbox.config/config
|
||||
#'uxbox.db/pool
|
||||
#'uxbox.redis/client
|
||||
#'uxbox.redis/conn
|
||||
#'uxbox.media/semaphore
|
||||
#'uxbox.services.init/query-services
|
||||
#'uxbox.services.init/mutation-services
|
||||
#'uxbox.migrations/migrations
|
||||
#'uxbox.media-storage/assets-storage
|
||||
#'uxbox.media-storage/media-storage})
|
||||
(mount/swap {#'uxbox.config/config config
|
||||
#'uxbox.db/pool pool})
|
||||
(-> (mount/only #{#'app.config/config
|
||||
#'app.db/pool
|
||||
#'app.redis/client
|
||||
#'app.redis/conn
|
||||
#'app.media/semaphore
|
||||
#'app.services.init/query-services
|
||||
#'app.services.init/mutation-services
|
||||
#'app.migrations/migrations
|
||||
#'app.media-storage/assets-storage
|
||||
#'app.media-storage/media-storage})
|
||||
(mount/swap {#'app.config/config config
|
||||
#'app.db/pool pool})
|
||||
(mount/start)))
|
||||
(next)
|
||||
(finally
|
||||
|
@ -70,8 +70,8 @@
|
|||
(try
|
||||
(next)
|
||||
(finally
|
||||
(ust/clear! uxbox.media-storage/media-storage)
|
||||
(ust/clear! uxbox.media-storage/assets-storage))))
|
||||
(ust/clear! app.media-storage/media-storage)
|
||||
(ust/clear! app.media-storage/assets-storage))))
|
||||
|
||||
(defn mk-uuid
|
||||
[prefix & args]
|
|
@ -5,17 +5,17 @@
|
|||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2020 UXBOX Labs SL
|
||||
;; Copyright (c) 2020 app Labs SL
|
||||
|
||||
(ns uxbox.tests.test-common-pages
|
||||
(ns app.tests.test-common-pages
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[clojure.pprint :refer [pprint]]
|
||||
[promesa.core :as p]
|
||||
[mockery.core :refer [with-mock]]
|
||||
[uxbox.common.pages :as cp]
|
||||
[uxbox.common.uuid :as uuid]
|
||||
[uxbox.tests.helpers :as th]))
|
||||
[app.common.pages :as cp]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.tests.helpers :as th]))
|
||||
|
||||
(t/deftest process-change-set-option
|
||||
(let [data cp/default-page-data]
|
|
@ -4,20 +4,20 @@
|
|||
;;
|
||||
;; Copyright (c) 2019 Andrey Antukh <niwi@niwi.nz>
|
||||
|
||||
(ns uxbox.tests.test-emails
|
||||
(ns app.tests.test-emails
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[promesa.core :as p]
|
||||
[mockery.core :refer [with-mock]]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.emails :as emails]
|
||||
[uxbox.tests.helpers :as th]))
|
||||
[app.db :as db]
|
||||
[app.emails :as emails]
|
||||
[app.tests.helpers :as th]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
||||
|
||||
(t/deftest register-email-rendering
|
||||
(let [result (emails/render emails/register {:to "example@uxbox.io" :name "foo"})]
|
||||
(let [result (emails/render emails/register {:to "example@app.io" :name "foo"})]
|
||||
(t/is (map? result))
|
||||
(t/is (contains? result :subject))
|
||||
(t/is (contains? result :content))
|
||||
|
@ -26,18 +26,18 @@
|
|||
(t/is (vector? (:content result)))))
|
||||
|
||||
;; (t/deftest email-sending-and-sendmail-job
|
||||
;; (let [res @(emails/send! emails/register {:to "example@uxbox.io" :name "foo"})]
|
||||
;; (let [res @(emails/send! emails/register {:to "example@app.io" :name "foo"})]
|
||||
;; (t/is (nil? res)))
|
||||
;; (with-mock mock
|
||||
;; {:target 'uxbox.jobs.sendmail/impl-sendmail
|
||||
;; {:target 'app.jobs.sendmail/impl-sendmail
|
||||
;; :return (p/resolved nil)}
|
||||
|
||||
;; (let [res @(uxbox.jobs.sendmail/send-emails {})]
|
||||
;; (let [res @(app.jobs.sendmail/send-emails {})]
|
||||
;; (t/is (= 1 res))
|
||||
;; (t/is (:called? @mock))
|
||||
;; (t/is (= 1 (:call-count @mock))))
|
||||
|
||||
;; (let [res @(uxbox.jobs.sendmail/send-emails {})]
|
||||
;; (let [res @(app.jobs.sendmail/send-emails {})]
|
||||
;; (t/is (= 0 res))
|
||||
;; (t/is (:called? @mock))
|
||||
;; (t/is (= 1 (:call-count @mock))))))
|
|
@ -5,19 +5,19 @@
|
|||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2020 UXBOX Labs SL
|
||||
;; Copyright (c) 2020 app Labs SL
|
||||
|
||||
(ns uxbox.tests.test-services-colors
|
||||
(ns app.tests.test-services-colors
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[datoteka.core :as fs]
|
||||
[clojure.java.io :as io]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.services.mutations :as sm]
|
||||
[uxbox.services.queries :as sq]
|
||||
[uxbox.util.storage :as ust]
|
||||
[uxbox.common.uuid :as uuid]
|
||||
[uxbox.tests.helpers :as th]))
|
||||
[app.db :as db]
|
||||
[app.services.mutations :as sm]
|
||||
[app.services.queries :as sq]
|
||||
[app.util.storage :as ust]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.tests.helpers :as th]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
|
@ -5,19 +5,19 @@
|
|||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2020 UXBOX Labs SL
|
||||
;; Copyright (c) 2020 app Labs SL
|
||||
|
||||
(ns uxbox.tests.test-services-files
|
||||
(ns app.tests.test-services-files
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[datoteka.core :as fs]
|
||||
[uxbox.common.uuid :as uuid]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.http :as http]
|
||||
[uxbox.services.mutations :as sm]
|
||||
[uxbox.services.queries :as sq]
|
||||
[uxbox.tests.helpers :as th]
|
||||
[uxbox.util.storage :as ust]))
|
||||
[app.common.uuid :as uuid]
|
||||
[app.db :as db]
|
||||
[app.http :as http]
|
||||
[app.services.mutations :as sm]
|
||||
[app.services.queries :as sq]
|
||||
[app.tests.helpers :as th]
|
||||
[app.util.storage :as ust]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
||||
|
@ -109,7 +109,7 @@
|
|||
error-data (ex-data error)]
|
||||
(t/is (th/ex-info? error))
|
||||
(t/is (= (:type error-data) :service-error))
|
||||
(t/is (= (:name error-data) :uxbox.services.queries.files/file)))
|
||||
(t/is (= (:name error-data) :app.services.queries.files/file)))
|
||||
|
||||
(let [error (ex-cause (:error out))
|
||||
error-data (ex-data error)]
|
|
@ -5,18 +5,18 @@
|
|||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2020 UXBOX Labs SL
|
||||
;; Copyright (c) 2020 app Labs SL
|
||||
|
||||
(ns uxbox.tests.test-services-media
|
||||
(ns app.tests.test-services-media
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[datoteka.core :as fs]
|
||||
[uxbox.common.uuid :as uuid]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.services.mutations :as sm]
|
||||
[uxbox.services.queries :as sq]
|
||||
[uxbox.tests.helpers :as th]
|
||||
[uxbox.util.storage :as ust]))
|
||||
[app.common.uuid :as uuid]
|
||||
[app.db :as db]
|
||||
[app.services.mutations :as sm]
|
||||
[app.services.queries :as sq]
|
||||
[app.tests.helpers :as th]
|
||||
[app.util.storage :as ust]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
||||
|
@ -30,7 +30,7 @@
|
|||
object-id-2 (uuid/next)]
|
||||
|
||||
(t/testing "create media object from url to file"
|
||||
(let [url "https://raw.githubusercontent.com/uxbox/uxbox/develop/frontend/resources/images/penpot-login.jpg"
|
||||
(let [url "https://raw.githubusercontent.com/app/app/develop/frontend/resources/images/penpot-login.jpg"
|
||||
data {::sm/type :add-media-object-from-url
|
||||
:id object-id-1
|
||||
:profile-id (:id prof)
|
||||
|
@ -54,7 +54,7 @@
|
|||
|
||||
(t/testing "upload media object to file"
|
||||
(let [content {:filename "sample.jpg"
|
||||
:tempfile (th/tempfile "uxbox/tests/_files/sample.jpg")
|
||||
:tempfile (th/tempfile "app/tests/_files/sample.jpg")
|
||||
:content-type "image/jpeg"
|
||||
:size 312043}
|
||||
data {::sm/type :upload-media-object
|
|
@ -5,20 +5,20 @@
|
|||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2020 UXBOX Labs SL
|
||||
;; Copyright (c) 2020 app Labs SL
|
||||
|
||||
(ns uxbox.tests.test-services-pages
|
||||
(ns app.tests.test-services-pages
|
||||
(:require
|
||||
[clojure.spec.alpha :as s]
|
||||
[clojure.test :as t]
|
||||
[promesa.core :as p]
|
||||
[uxbox.common.pages :as cp]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.http :as http]
|
||||
[uxbox.services.mutations :as sm]
|
||||
[uxbox.services.queries :as sq]
|
||||
[uxbox.common.uuid :as uuid]
|
||||
[uxbox.tests.helpers :as th]))
|
||||
[app.common.pages :as cp]
|
||||
[app.db :as db]
|
||||
[app.http :as http]
|
||||
[app.services.mutations :as sm]
|
||||
[app.services.queries :as sq]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.tests.helpers :as th]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
||||
|
@ -168,7 +168,7 @@
|
|||
error-data (ex-data error)]
|
||||
(t/is (th/ex-info? error))
|
||||
(t/is (= (:type error-data) :service-error))
|
||||
(t/is (= (:name error-data) :uxbox.services.mutations.pages/update-page)))
|
||||
(t/is (= (:name error-data) :app.services.mutations.pages/update-page)))
|
||||
|
||||
(let [error (ex-cause (:error out))
|
||||
error-data (ex-data error)]
|
|
@ -7,18 +7,18 @@
|
|||
;;
|
||||
;; Copyright (c) 2019-2020 Andrey Antukh <niwi@niwi.nz>
|
||||
|
||||
(ns uxbox.tests.test-services-profile
|
||||
(ns app.tests.test-services-profile
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[clojure.java.io :as io]
|
||||
[mockery.core :refer [with-mocks]]
|
||||
[cuerdas.core :as str]
|
||||
[datoteka.core :as fs]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.services.mutations :as sm]
|
||||
[uxbox.services.queries :as sq]
|
||||
[uxbox.services.mutations.profile :as profile]
|
||||
[uxbox.tests.helpers :as th]))
|
||||
[app.db :as db]
|
||||
[app.services.mutations :as sm]
|
||||
[app.services.queries :as sq]
|
||||
[app.services.mutations.profile :as profile]
|
||||
[app.tests.helpers :as th]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
||||
|
@ -40,7 +40,7 @@
|
|||
(let [error (ex-cause (:error out))]
|
||||
(t/is (th/ex-info? error))
|
||||
(t/is (th/ex-of-type? error :validation))
|
||||
(t/is (th/ex-of-code? error :uxbox.services.mutations.profile/wrong-credentials)))))
|
||||
(t/is (th/ex-of-code? error :app.services.mutations.profile/wrong-credentials)))))
|
||||
|
||||
(t/testing "success"
|
||||
(let [event {::sm/type :login
|
||||
|
@ -98,7 +98,7 @@
|
|||
:profile-id (:id profile)
|
||||
:file {:filename "sample.jpg"
|
||||
:size 123123
|
||||
:tempfile "tests/uxbox/tests/_files/sample.jpg"
|
||||
:tempfile "tests/app/tests/_files/sample.jpg"
|
||||
:content-type "image/jpeg"}}
|
||||
out (th/try-on! (sm/handle data))]
|
||||
|
||||
|
@ -116,7 +116,7 @@
|
|||
|
||||
;; (t/testing "try to delete profile not marked for deletion"
|
||||
;; (let [params {:props {:profile-id (:id prof)}}
|
||||
;; out (th/try-on! (uxbox.tasks.delete-profile/handler params))]
|
||||
;; out (th/try-on! (app.tasks.delete-profile/handler params))]
|
||||
|
||||
;; ;; (th/print-result! out)
|
||||
;; (t/is (nil? (:error out)))
|
||||
|
@ -135,7 +135,7 @@
|
|||
|
||||
;; (t/testing "mark profile for deletion"
|
||||
;; (with-mocks
|
||||
;; [mock {:target 'uxbox.tasks/schedule! :return nil}]
|
||||
;; [mock {:target 'app.tasks/schedule! :return nil}]
|
||||
|
||||
;; (let [data {::sm/type :delete-profile
|
||||
;; :profile-id (:id prof)}
|
||||
|
@ -163,7 +163,7 @@
|
|||
|
||||
;; (t/testing "try to delete profile marked for deletion"
|
||||
;; (let [params {:props {:profile-id (:id prof)}}
|
||||
;; out (th/try-on! (uxbox.tasks.delete-profile/handler params))]
|
||||
;; out (th/try-on! (app.tasks.delete-profile/handler params))]
|
||||
|
||||
;; ;; (th/print-result! out)
|
||||
;; (t/is (nil? (:error out)))
|
||||
|
@ -180,7 +180,7 @@
|
|||
;; error-data (ex-data error)]
|
||||
;; (t/is (th/ex-info? error))
|
||||
;; (t/is (= (:type error-data) :service-error))
|
||||
;; (t/is (= (:name error-data) :uxbox.services.queries.profile/profile)))
|
||||
;; (t/is (= (:name error-data) :app.services.queries.profile/profile)))
|
||||
|
||||
;; (let [error (ex-cause (:error out))
|
||||
;; error-data (ex-data error)]
|
|
@ -1,13 +1,13 @@
|
|||
(ns uxbox.tests.test-services-projects
|
||||
(ns app.tests.test-services-projects
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[promesa.core :as p]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.http :as http]
|
||||
[uxbox.services.mutations :as sm]
|
||||
[uxbox.services.queries :as sq]
|
||||
[uxbox.tests.helpers :as th]
|
||||
[uxbox.common.uuid :as uuid]))
|
||||
[app.db :as db]
|
||||
[app.http :as http]
|
||||
[app.services.mutations :as sm]
|
||||
[app.services.queries :as sq]
|
||||
[app.tests.helpers :as th]
|
||||
[app.common.uuid :as uuid]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
|
@ -1,13 +1,13 @@
|
|||
(ns uxbox.tests.test-services-user-attrs
|
||||
(ns app.tests.test-services-user-attrs
|
||||
(:require
|
||||
[clojure.spec.alpha :as s]
|
||||
[clojure.test :as t]
|
||||
[promesa.core :as p]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.http :as http]
|
||||
[uxbox.services.mutations :as sm]
|
||||
[uxbox.services.queries :as sq]
|
||||
[uxbox.tests.helpers :as th]))
|
||||
[app.db :as db]
|
||||
[app.http :as http]
|
||||
[app.services.mutations :as sm]
|
||||
[app.services.queries :as sq]
|
||||
[app.tests.helpers :as th]))
|
||||
|
||||
;; (t/use-fixtures :once th/state-init)
|
||||
;; (t/use-fixtures :each th/database-reset)
|
|
@ -5,19 +5,19 @@
|
|||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2020 UXBOX Labs SL
|
||||
;; Copyright (c) 2020 app Labs SL
|
||||
|
||||
(ns uxbox.tests.test-services-viewer
|
||||
(ns app.tests.test-services-viewer
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[datoteka.core :as fs]
|
||||
[uxbox.common.uuid :as uuid]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.http :as http]
|
||||
[uxbox.services.mutations :as sm]
|
||||
[uxbox.services.queries :as sq]
|
||||
[uxbox.tests.helpers :as th]
|
||||
[uxbox.util.storage :as ust]))
|
||||
[app.common.uuid :as uuid]
|
||||
[app.db :as db]
|
||||
[app.http :as http]
|
||||
[app.services.mutations :as sm]
|
||||
[app.services.queries :as sq]
|
||||
[app.tests.helpers :as th]
|
||||
[app.util.storage :as ust]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
(t/use-fixtures :each th/database-reset)
|
||||
|
@ -71,7 +71,7 @@
|
|||
error-data (ex-data error)]
|
||||
(t/is (th/ex-info? error))
|
||||
(t/is (= (:type error-data) :service-error))
|
||||
(t/is (= (:name error-data) :uxbox.services.queries.viewer/viewer-bundle)))
|
||||
(t/is (= (:name error-data) :app.services.queries.viewer/viewer-bundle)))
|
||||
|
||||
(let [error (ex-cause (:error out))
|
||||
error-data (ex-data error)]
|
|
@ -1,13 +1,13 @@
|
|||
(ns uxbox.tests.test-util-svg
|
||||
(ns app.tests.test-util-svg
|
||||
(:require
|
||||
[clojure.test :as t]
|
||||
[clojure.java.io :as io]
|
||||
[uxbox.http :as http]
|
||||
[uxbox.util.svg :as svg]
|
||||
[uxbox.tests.helpers :as th]))
|
||||
[app.http :as http]
|
||||
[app.util.svg :as svg]
|
||||
[app.tests.helpers :as th]))
|
||||
|
||||
(t/deftest parse-svg-1
|
||||
(let [result (-> (io/resource "uxbox/tests/_files/sample1.svg")
|
||||
(let [result (-> (io/resource "app/tests/_files/sample1.svg")
|
||||
(svg/parse))]
|
||||
(t/is (contains? result :width))
|
||||
(t/is (contains? result :height))
|
||||
|
@ -20,7 +20,7 @@
|
|||
(t/is (= "lock.svg" (:name result)))))
|
||||
|
||||
(t/deftest parse-svg-2
|
||||
(let [result (-> (io/resource "uxbox/tests/_files/sample2.svg")
|
||||
(let [result (-> (io/resource "app/tests/_files/sample2.svg")
|
||||
(svg/parse))]
|
||||
(t/is (contains? result :width))
|
||||
(t/is (contains? result :height))
|
||||
|
@ -33,7 +33,7 @@
|
|||
(t/is (= "play.svg" (:name result)))))
|
||||
|
||||
(t/deftest parse-invalid-svg-1
|
||||
(let [image (io/resource "uxbox/tests/_files/sample.jpg")
|
||||
(let [image (io/resource "app/tests/_files/sample.jpg")
|
||||
out (th/try! (svg/parse image))]
|
||||
|
||||
(let [error (:error out)]
|
|
@ -15,16 +15,16 @@
|
|||
[clojure.pprint :refer [pprint]]
|
||||
[clojure.test :as test]
|
||||
[clojure.java.io :as io]
|
||||
[uxbox.common.pages :as cp]
|
||||
[app.common.pages :as cp]
|
||||
[clojure.repl :refer :all]
|
||||
[criterium.core :refer [quick-bench bench with-progress-reporting]]
|
||||
[clj-kondo.core :as kondo]
|
||||
[uxbox.migrations]
|
||||
[uxbox.db :as db]
|
||||
[uxbox.metrics :as mtx]
|
||||
[uxbox.util.storage :as st]
|
||||
[uxbox.util.time :as tm]
|
||||
[uxbox.util.blob :as blob]
|
||||
[app.migrations]
|
||||
[app.db :as db]
|
||||
[app.metrics :as mtx]
|
||||
[app.util.storage :as st]
|
||||
[app.util.time :as tm]
|
||||
[app.util.blob :as blob]
|
||||
[mount.core :as mount]))
|
||||
|
||||
;; --- Benchmarking Tools
|
||||
|
@ -49,7 +49,7 @@
|
|||
|
||||
(defn- start
|
||||
[]
|
||||
(-> #_(mount/except #{#'uxbox.scheduled-jobs/scheduler})
|
||||
(-> #_(mount/except #{#'app.scheduled-jobs/scheduler})
|
||||
(mount/start)))
|
||||
|
||||
(defn- stop
|
||||
|
@ -62,7 +62,7 @@
|
|||
(repl/refresh :after 'user/start))
|
||||
|
||||
(defn- run-tests
|
||||
([] (run-tests #"^uxbox.tests.*"))
|
||||
([] (run-tests #"^app.tests.*"))
|
||||
([o]
|
||||
(repl/refresh)
|
||||
(cond
|
||||
|
@ -83,8 +83,8 @@
|
|||
:cache false
|
||||
:config {:linters
|
||||
{:unresolved-symbol
|
||||
{:exclude ['(uxbox.services.mutations/defmutation)
|
||||
'(uxbox.services.queries/defquery)
|
||||
'(uxbox.db/with-atomic)
|
||||
{:exclude ['(app.services.mutations/defmutation)
|
||||
'(app.services.queries/defquery)
|
||||
'(app.db/with-atomic)
|
||||
'(promesa.core/let)]}}}})
|
||||
(kondo/print!))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue