mirror of
https://github.com/penpot/penpot.git
synced 2026-06-25 16:52:11 +00:00
✨ Add more testing related improvements
This commit is contained in:
parent
0d3a174f13
commit
bfa65547f8
@ -4,7 +4,7 @@
|
||||
"license": "MPL-2.0",
|
||||
"author": "Kaleidos INC Sucursal en España SL",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@11.7.0+sha512.19cc852c120c7125760f2443ee6be0ca5b40f9f50598de1a09a1f177503e010e57c23c77646e01e761de59bf874fb22a3398c33ab9691fc13eb946b6f0f4d620",
|
||||
"packageManager": "pnpm@11.9.0+sha512.bd682d5d03fe525ef7c9fd6780c6884d1e756ac4c9c9fe00c538782824310dcf90e3ddc4f53835f06dfaebd5085e41855e0bcbb3b60de2ac5bbab89e5036f03b",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -29,7 +29,7 @@
|
||||
"lint": "pnpm run lint:clj",
|
||||
"watch:test": "concurrently \"clojure -M:dev:shadow-cljs watch test\" \"nodemon -C -d 2 -w target/tests/ --exec 'node target/tests/test.js'\"",
|
||||
"build:test": "clojure -M:dev:shadow-cljs compile test",
|
||||
"test:js": "pnpm run build:test && node target/tests/test.js",
|
||||
"test:js": "[ -f target/tests/test.js ] || pnpm run build:test; node target/tests/test.js",
|
||||
"test:quiet": "node ./scripts/test-quiet.js",
|
||||
"test:jvm": "clojure -M:dev:test"
|
||||
}
|
||||
|
||||
@ -168,6 +168,10 @@
|
||||
(if (cljs.test/successful? m)
|
||||
(.exit js/process 0)
|
||||
(.exit js/process 1))))
|
||||
#?(:cljs
|
||||
(defmethod t/report [:cljs.test/default :begin-test-var] [m]
|
||||
(let [v (:var m)]
|
||||
(println (str " ▸ " (:ns (meta v)) "/" (:name (meta v)))))))
|
||||
|
||||
#?(:cljs
|
||||
(do
|
||||
@ -278,18 +282,20 @@
|
||||
:once-fixtures (:once fixtures)
|
||||
:each-fixtures (:each fixtures))
|
||||
summary (volatile! {:test 0 :pass 0 :fail 0 :error 0 :type :summary})]
|
||||
(t/run-block
|
||||
(concat [(fn [] (t/set-env! env))]
|
||||
(t/test-vars-block vars)
|
||||
[(fn []
|
||||
(vswap! summary
|
||||
|
||||
(t/set-env! env)
|
||||
|
||||
(t/run-block
|
||||
(concat (t/test-vars-block vars)
|
||||
[(fn []
|
||||
(vswap! summary
|
||||
(partial merge-with +)
|
||||
(:report-counters (t/get-and-clear-env!))))
|
||||
(fn []
|
||||
(t/set-env! env)
|
||||
(t/do-report @summary)
|
||||
(t/report (assoc @summary :type :end-run-tests))
|
||||
(t/clear-env!))]))))
|
||||
(fn []
|
||||
(t/set-env! env)
|
||||
(t/report @summary)
|
||||
(t/report (assoc @summary :type :end-run-tests))
|
||||
(t/clear-env!))]))))
|
||||
|
||||
(defn- run-focused-test!
|
||||
[focus]
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { spawnSync } from "node:child_process";
|
||||
|
||||
const BUILD_STEPS = [
|
||||
{ label: "Building wasm", cmd: "pnpm", args: ["run", "build:wasm"] },
|
||||
{ label: "Building test bundle", cmd: "pnpm", args: ["run", "build:test"] },
|
||||
];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user