0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00
penpot/frontend/test/frontend_tests/setup_test.cljs
Andrey Antukh 5b3e12bb9c ♻️ Refactor change builder for make it more efficient
Mainly replaces the usafe of the inneficient d/preconj helper
with a combination of conj and simple list as data structure whitch
maintains the previous ordering semantics on addition.

Also removes the d/preconj from the codebase.
2023-09-04 15:48:34 +02:00

31 lines
1.2 KiB
Clojure

;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns frontend-tests.setup-test
(:require
[app.common.schema :as sm]
[app.common.pprint :as pp]
[cljs.test :as t]))
(.on js/process "uncaughtException" (fn [cause]
(try
(js/console.log "EE" (.-stack cause))
(when-let [data (some-> cause ex-data ::sm/explain)]
(pp/pprint (sm/humanize-data data)))
(finally
(js/console.log "EXIT")
(.exit js/process -1)))))
(defmethod t/report [:cljs.test/default :end-run-tests]
[m]
(if (t/successful? m)
(set! (.-exitCode js/process) 0)
(set! (.-exitCode js/process) 1)))
#_(set! *main-cli-fn*
#(t/run-tests 'frontend-tests.test-snap-data
'frontend-tests.test-simple-math
'frontend-tests.test-range-tree))