From 10033ead913a8f956c0a2547fef464b697740725 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Mon, 24 Jun 2024 14:23:03 +0200 Subject: [PATCH] Add specific esm testing environment for tokens --- frontend/package.json | 4 ++++ frontend/shadow-cljs.edn | 3 ++- frontend/test/token_tests/style_dictionary_test.cljs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index a373539f99..c4b5b3c950 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,6 +26,10 @@ "test:run": "node target/tests.cjs", "test:watch": "clojure -M:dev:shadow-cljs watch test", "test": "yarn run test:compile && yarn run test:run", + "token-test:compile": "clojure -M:dev:shadow-cljs compile test-esm --config-merge '{:autorun false}'", + "token-test:run": "bun target/tests-esm.cjs", + "token-test:watch": "clojure -M:dev:shadow-cljs watch test-esm", + "token-test": "yarn run token-test:compile && yarn run token-test:run", "translations:validate": "node ./scripts/validate-translations.js", "translations:find-unused": "node ./scripts/find-unused-translations.js", "compile": "node ./scripts/compile.js", diff --git a/frontend/shadow-cljs.edn b/frontend/shadow-cljs.edn index 83b46479ab..7201b1dcb7 100644 --- a/frontend/shadow-cljs.edn +++ b/frontend/shadow-cljs.edn @@ -159,7 +159,8 @@ :warnings {:fn-deprecated false}}} :test-esm - {:target :esm-files + {:target :node-test + :output-to "target/tests-esm.cjs" :output-dir "target/test-esm" :ns-regexp "^token-tests.*-test$" :autorun true diff --git a/frontend/test/token_tests/style_dictionary_test.cljs b/frontend/test/token_tests/style_dictionary_test.cljs index 45e561c1a4..5506cb8d74 100644 --- a/frontend/test/token_tests/style_dictionary_test.cljs +++ b/frontend/test/token_tests/style_dictionary_test.cljs @@ -3,7 +3,7 @@ ;; file, You can obtain one at http://mozilla.org/MPL/2.0/. ;; ;; Copyright (c) KALEIDOS INC -(ns frontend-tests.tokens.style-dictionary-test +(ns token-tests.style-dictionary-test (:require [app.main.ui.workspace.tokens.style-dictionary :as wtsd] [cljs.test :as t :include-macros true]))