mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
🔧 Register the missing test namespaces in the common JS runner (#12074)
Kaocha finds every test namespace on the JVM, but the JS runner only runs the ones listed in runner.cljc. Sixteen namespaces were missing from both lists, and files.shapes-builder-test was required but not listed, so 125 tests never ran in JS. Add them to both lists, sorted. The only one that failed in JS was make-tokens-status-from-tokens-lib: (.sets base-lib) is a method call in ClojureScript. On the JVM it read the field, but (:sets ...) on the result gave nil, so the legacy lib was built without sets or themes. Use (.-sets base-lib) and (.-themes base-lib), as the first part of the same test does. AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
61bc585386
commit
c04a3d346d
@ -21,8 +21,11 @@
|
||||
[common-tests.files-migrations-0025-test]
|
||||
[common-tests.files-migrations-0026-test]
|
||||
[common-tests.files-migrations-test]
|
||||
[common-tests.files.comp-processors-test]
|
||||
[common-tests.files.helpers-test]
|
||||
[common-tests.files.repair-test]
|
||||
[common-tests.files.shapes-builder-test]
|
||||
[common-tests.files.tokens-test]
|
||||
[common-tests.files.validate-test]
|
||||
[common-tests.geom-align-test]
|
||||
[common-tests.geom-bounds-layout-nil-test]
|
||||
@ -48,6 +51,7 @@
|
||||
[common-tests.geom-shapes-tree-seq-test]
|
||||
[common-tests.geom-snap-test]
|
||||
[common-tests.geom-test]
|
||||
[common-tests.helpers-test]
|
||||
[common-tests.logging-test]
|
||||
[common-tests.logic.chained-propagation-test]
|
||||
[common-tests.logic.comp-creation-test]
|
||||
@ -63,8 +67,13 @@
|
||||
[common-tests.logic.multiple-nesting-levels-test]
|
||||
[common-tests.logic.swap-and-reset-test]
|
||||
[common-tests.logic.swap-as-override-test]
|
||||
[common-tests.logic.swap-keeps-id-test]
|
||||
[common-tests.logic.text-sync-test]
|
||||
[common-tests.logic.text-touched-test]
|
||||
[common-tests.logic.token-apply-test]
|
||||
[common-tests.logic.token-test]
|
||||
[common-tests.logic.variants-switch-test]
|
||||
[common-tests.logic.variants-test]
|
||||
[common-tests.math-test]
|
||||
[common-tests.media-test]
|
||||
[common-tests.path-names-test]
|
||||
@ -75,11 +84,14 @@
|
||||
[common-tests.svg-test]
|
||||
[common-tests.text-test]
|
||||
[common-tests.time-test]
|
||||
[common-tests.token-test]
|
||||
[common-tests.types-shape-tree-test]
|
||||
[common-tests.types.absorb-assets-test]
|
||||
[common-tests.types.color-test]
|
||||
[common-tests.types.components-test]
|
||||
[common-tests.types.container-test]
|
||||
[common-tests.types.fill-test]
|
||||
[common-tests.types.font-test]
|
||||
[common-tests.types.modifiers-test]
|
||||
[common-tests.types.objects-map-test]
|
||||
[common-tests.types.organization-test]
|
||||
@ -89,11 +101,15 @@
|
||||
[common-tests.types.shape-interactions-test]
|
||||
[common-tests.types.shape-layout-test]
|
||||
[common-tests.types.stroke-test]
|
||||
[common-tests.types.text-test]
|
||||
[common-tests.types.token-test]
|
||||
[common-tests.types.tokens-lib-test]
|
||||
[common-tests.types.tokens-migrations-test]
|
||||
[common-tests.types.tokens-status-test]
|
||||
[common-tests.types.variant-test]
|
||||
[common-tests.undo-stack-test]
|
||||
[common-tests.uuid-test]))
|
||||
[common-tests.uuid-test]
|
||||
[common-tests.variant-test]))
|
||||
|
||||
(def test-namespaces
|
||||
[#?(:clj 'common-tests.fressian-test)
|
||||
@ -101,12 +117,16 @@
|
||||
'common-tests.buffer-test
|
||||
'common-tests.colors-test
|
||||
'common-tests.data-test
|
||||
'common-tests.files-changes-test
|
||||
'common-tests.files-builder-test
|
||||
'common-tests.files.helpers-test
|
||||
'common-tests.files-changes-test
|
||||
'common-tests.files-migrations-0025-test
|
||||
'common-tests.files-migrations-0026-test
|
||||
'common-tests.files-migrations-test
|
||||
'common-tests.files.comp-processors-test
|
||||
'common-tests.files.helpers-test
|
||||
'common-tests.files.repair-test
|
||||
'common-tests.files.shapes-builder-test
|
||||
'common-tests.files.tokens-test
|
||||
'common-tests.files.validate-test
|
||||
'common-tests.geom-align-test
|
||||
'common-tests.geom-bounds-layout-nil-test
|
||||
@ -132,6 +152,7 @@
|
||||
'common-tests.geom-shapes-tree-seq-test
|
||||
'common-tests.geom-snap-test
|
||||
'common-tests.geom-test
|
||||
'common-tests.helpers-test
|
||||
'common-tests.logging-test
|
||||
'common-tests.logic.chained-propagation-test
|
||||
'common-tests.logic.comp-creation-test
|
||||
@ -147,8 +168,13 @@
|
||||
'common-tests.logic.multiple-nesting-levels-test
|
||||
'common-tests.logic.swap-and-reset-test
|
||||
'common-tests.logic.swap-as-override-test
|
||||
'common-tests.logic.swap-keeps-id-test
|
||||
'common-tests.logic.text-sync-test
|
||||
'common-tests.logic.text-touched-test
|
||||
'common-tests.logic.token-apply-test
|
||||
'common-tests.logic.token-test
|
||||
'common-tests.logic.variants-switch-test
|
||||
'common-tests.logic.variants-test
|
||||
'common-tests.math-test
|
||||
'common-tests.media-test
|
||||
'common-tests.path-names-test
|
||||
@ -159,11 +185,14 @@
|
||||
'common-tests.svg-test
|
||||
'common-tests.text-test
|
||||
'common-tests.time-test
|
||||
'common-tests.token-test
|
||||
'common-tests.types-shape-tree-test
|
||||
'common-tests.types.absorb-assets-test
|
||||
'common-tests.types.color-test
|
||||
'common-tests.types.components-test
|
||||
'common-tests.types.container-test
|
||||
'common-tests.types.fill-test
|
||||
'common-tests.types.font-test
|
||||
'common-tests.types.modifiers-test
|
||||
'common-tests.types.objects-map-test
|
||||
'common-tests.types.organization-test
|
||||
@ -173,11 +202,15 @@
|
||||
'common-tests.types.shape-interactions-test
|
||||
'common-tests.types.shape-layout-test
|
||||
'common-tests.types.stroke-test
|
||||
'common-tests.types.text-test
|
||||
'common-tests.types.token-test
|
||||
'common-tests.types.tokens-lib-test
|
||||
'common-tests.types.tokens-migrations-test
|
||||
'common-tests.types.tokens-status-test
|
||||
'common-tests.types.variant-test
|
||||
'common-tests.undo-stack-test
|
||||
'common-tests.uuid-test])
|
||||
'common-tests.uuid-test
|
||||
'common-tests.variant-test])
|
||||
|
||||
#?(:cljs
|
||||
(assert (every? find-ns-obj test-namespaces)
|
||||
|
||||
@ -126,8 +126,8 @@
|
||||
(t/testing "returns empty sets when no active themes"
|
||||
(let [base-lib (ctob/make-tokens-lib)
|
||||
tokens-lib (ctob/map->tokens-lib
|
||||
{:sets (:sets (.sets base-lib))
|
||||
:themes (:themes (.themes base-lib))
|
||||
{:sets (.-sets base-lib)
|
||||
:themes (.-themes base-lib)
|
||||
:active-themes #{}})
|
||||
status (cfo/make-tokens-status-from-lib tokens-lib)]
|
||||
(t/is (= #{} (ctos/get-active-theme-ids status)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user