diff --git a/editor/karma-base.conf.js b/editor/karma-base.conf.js index b7ae2e81309b..95410c01b8d4 100644 --- a/editor/karma-base.conf.js +++ b/editor/karma-base.conf.js @@ -54,7 +54,8 @@ module.exports = function (config) { // list of files / patterns to load in the browser files: [ './mocha-setup-beforeall.js', - './karma-setup.js', + './karma-setup.js', // this must run before importing the editor-entry-point-imports module + './src/templates/editor-entry-point-imports.tsx', // we load the real editor entry point first, to make sure the environment matches the real environment, and also to avoid diverging circular dependencies { pattern: './resources/editor/**/*.png', watched: false, @@ -62,8 +63,16 @@ module.exports = function (config) { included: false, nocache: false, }, + { + pattern: './resources/editor/**/*.css', + watched: false, + served: true, + included: false, + nocache: false, + }, ], proxies: { + '/editor/css/': '/base/resources/editor/css', '/editor/icons': '/base/resources/editor/icons', '/editor/cursors': '/base/resources/editor/cursors', '/editor/fills': '/base/resources/editor/fills', diff --git a/editor/karma-setup.js b/editor/karma-setup.js index e81eb48d4303..7aac2f522b49 100644 --- a/editor/karma-setup.js +++ b/editor/karma-setup.js @@ -18,6 +18,7 @@ ReactTestingLibrary.configure({ }, }) +// this must run before importing the editor-entry-point-imports module window.expect = expect window.jest = null window.KarmaTestEnvironment = true diff --git a/editor/package.json b/editor/package.json index ef1ed9c69c99..9a1a7dd2e06b 100644 --- a/editor/package.json +++ b/editor/package.json @@ -50,7 +50,7 @@ "lint-editor": "lint-staged", "dev-fast": "APP_ENV=development REACT_APP_ENVIRONMENT_CONFIG=development REACT_APP_AUTH0_CLIENT_ID=$AUTH0_CLIENT_ID REACT_APP_AUTH0_ENDPOINT=$AUTH0_ENDPOINT REACT_APP_AUTH0_REDIRECT_URI=$AUTH0_REDIRECT_URI REACT_APP_COMMIT_HASH=`git rev-parse HEAD` vite --force", "vite-build": "node --max_old_space_size=16384 ./node_modules/vite/bin/vite build -- -DEBUG", - "watch-tsc": "tsc --watch && NODE_OPTIONS=\"--max_old_space_size=4096 $NODE_OPENSSL_OPTION\"", + "watch-tsc": "tsc --watch --noEmit && NODE_OPTIONS=\"--max_old_space_size=4096 $NODE_OPENSSL_OPTION\"", "unused-exports": "ts-unused-exports ./tsconfig.json --ignoreLocallyUsed" }, "lint-staged": { diff --git a/editor/src/components/canvas/__snapshots__/ui-jsx-canvas-bugs.spec.tsx.snap b/editor/src/components/canvas/__snapshots__/ui-jsx-canvas-bugs.spec.tsx.snap index e82c1b649993..47314c6b6785 100644 --- a/editor/src/components/canvas/__snapshots__/ui-jsx-canvas-bugs.spec.tsx.snap +++ b/editor/src/components/canvas/__snapshots__/ui-jsx-canvas-bugs.spec.tsx.snap @@ -4,6 +4,7 @@ exports[`UiJsxCanvas #747 - DOM object constructor cannot be called as a functio "