From 4dcceef1d607f4fae85bcd33bc38614508aa027c Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Mon, 16 Nov 2026 10:58:21 +0000 Subject: [PATCH] chore: require Node.js 24.15 or later and switch the shared IDE test configs from Jest to Vitest (#6676) --- ...mplate__of_JavaScriptTestRunnerVitest.xml} | 5 +- .../.idea/runConfigurations/error_spec_js.xml | 13 ---- .../runConfigurations/events_spec_js.xml | 13 ---- .../.idea/runConfigurations/grid_spec_js.xml | 13 ---- .../runConfigurations/importer_spec_js.xml | 13 ---- .../.idea/runConfigurations/index_spec_js.xml | 13 ---- .../.idea/runConfigurations/login_spec_js.xml | 13 ---- .../runConfigurations/object_spec_js.xml | 13 ---- .../passwordInput_spec_js.xml | 13 ---- .../runConfigurations/signup_spec_js.xml | 13 ---- .../runConfigurations/string_spec_js.xml | 13 ---- .../.idea/runConfigurations/table_spec_js.xml | 13 ---- .../runConfigurations/viewFilters_spec_js.xml | 13 ---- .../.idea/runConfigurations/xml_spec_js.xml | 13 ---- config/vscode/.vscode/launch.json | 40 ++++++------ config/vscode/.vscode/settings.json | 5 +- config/vscode/vsc-extensions.txt | 2 +- docs/development/directory-structure.md | 2 +- .../running-the-dev-env-locally.md | 12 ++-- docs/development/tools.md | 11 ++-- docs/development/vscode-setup.md | 19 +++--- docs/installation/supported.md | 2 +- enterprise/web-frontend/jest.config.js | 61 ----------------- premium/web-frontend/jest.config.js | 65 ------------------- web-frontend/coverage.config.js | 25 ------- web-frontend/jest.config.js | 26 -------- 26 files changed, 49 insertions(+), 395 deletions(-) rename config/intellij/.idea/runConfigurations/{_template__of_JavaScriptTestRunnerJest.xml => _template__of_JavaScriptTestRunnerVitest.xml} (62%) delete mode 100644 config/intellij/.idea/runConfigurations/error_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/events_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/grid_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/importer_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/index_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/login_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/object_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/passwordInput_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/signup_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/string_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/table_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/viewFilters_spec_js.xml delete mode 100644 config/intellij/.idea/runConfigurations/xml_spec_js.xml delete mode 100644 enterprise/web-frontend/jest.config.js delete mode 100644 premium/web-frontend/jest.config.js delete mode 100644 web-frontend/coverage.config.js delete mode 100644 web-frontend/jest.config.js diff --git a/config/intellij/.idea/runConfigurations/_template__of_JavaScriptTestRunnerJest.xml b/config/intellij/.idea/runConfigurations/_template__of_JavaScriptTestRunnerVitest.xml similarity index 62% rename from config/intellij/.idea/runConfigurations/_template__of_JavaScriptTestRunnerJest.xml rename to config/intellij/.idea/runConfigurations/_template__of_JavaScriptTestRunnerVitest.xml index 65e59363ec..048b079af3 100644 --- a/config/intellij/.idea/runConfigurations/_template__of_JavaScriptTestRunnerJest.xml +++ b/config/intellij/.idea/runConfigurations/_template__of_JavaScriptTestRunnerVitest.xml @@ -1,10 +1,11 @@ - + + - \ No newline at end of file + diff --git a/config/intellij/.idea/runConfigurations/error_spec_js.xml b/config/intellij/.idea/runConfigurations/error_spec_js.xml deleted file mode 100644 index 6c8c250401..0000000000 --- a/config/intellij/.idea/runConfigurations/error_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/events_spec_js.xml b/config/intellij/.idea/runConfigurations/events_spec_js.xml deleted file mode 100644 index 4e52cbd178..0000000000 --- a/config/intellij/.idea/runConfigurations/events_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/grid_spec_js.xml b/config/intellij/.idea/runConfigurations/grid_spec_js.xml deleted file mode 100644 index 229e93a7db..0000000000 --- a/config/intellij/.idea/runConfigurations/grid_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/importer_spec_js.xml b/config/intellij/.idea/runConfigurations/importer_spec_js.xml deleted file mode 100644 index ee9f4400fb..0000000000 --- a/config/intellij/.idea/runConfigurations/importer_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/index_spec_js.xml b/config/intellij/.idea/runConfigurations/index_spec_js.xml deleted file mode 100644 index 039a7c72cc..0000000000 --- a/config/intellij/.idea/runConfigurations/index_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/login_spec_js.xml b/config/intellij/.idea/runConfigurations/login_spec_js.xml deleted file mode 100644 index ea00308674..0000000000 --- a/config/intellij/.idea/runConfigurations/login_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/object_spec_js.xml b/config/intellij/.idea/runConfigurations/object_spec_js.xml deleted file mode 100644 index 09384031d1..0000000000 --- a/config/intellij/.idea/runConfigurations/object_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/passwordInput_spec_js.xml b/config/intellij/.idea/runConfigurations/passwordInput_spec_js.xml deleted file mode 100644 index a88cddb59d..0000000000 --- a/config/intellij/.idea/runConfigurations/passwordInput_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/signup_spec_js.xml b/config/intellij/.idea/runConfigurations/signup_spec_js.xml deleted file mode 100644 index 5440b09197..0000000000 --- a/config/intellij/.idea/runConfigurations/signup_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/string_spec_js.xml b/config/intellij/.idea/runConfigurations/string_spec_js.xml deleted file mode 100644 index 3beef2b3f4..0000000000 --- a/config/intellij/.idea/runConfigurations/string_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/table_spec_js.xml b/config/intellij/.idea/runConfigurations/table_spec_js.xml deleted file mode 100644 index 503e0f6278..0000000000 --- a/config/intellij/.idea/runConfigurations/table_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/viewFilters_spec_js.xml b/config/intellij/.idea/runConfigurations/viewFilters_spec_js.xml deleted file mode 100644 index a0baa07880..0000000000 --- a/config/intellij/.idea/runConfigurations/viewFilters_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/intellij/.idea/runConfigurations/xml_spec_js.xml b/config/intellij/.idea/runConfigurations/xml_spec_js.xml deleted file mode 100644 index 2d53702aff..0000000000 --- a/config/intellij/.idea/runConfigurations/xml_spec_js.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/config/vscode/.vscode/launch.json b/config/vscode/.vscode/launch.json index 933dd1929c..93e107319a 100644 --- a/config/vscode/.vscode/launch.json +++ b/config/vscode/.vscode/launch.json @@ -58,41 +58,39 @@ }, }, { - "name": "vscode-jest-current-file", + // Core (web-frontend) tests only. Premium and enterprise tests use their + // own Vitest config: run or debug them from the Vitest extension instead. + "name": "vitest: current core test file", "type": "node", - "runtimeVersion": "16.15.0", + "runtimeVersion": "24", "request": "launch", "cwd": "${workspaceFolder}/web-frontend", - "program": "./node_modules/jest/bin/jest", - "args": [ - "${fileBasename}", - "--verbose", - "-i", - "--no-cache" - ], + "program": "${workspaceFolder}/web-frontend/node_modules/vitest/vitest.mjs", + "args": ["run", "${file}", "--no-file-parallelism"], "env": { - "PRIVATE_BACKEND_URL": "http://localhost:8000" + "NODE_OPTIONS": "--max-old-space-size=8192" }, + "autoAttachChildProcesses": true, + "skipFiles": ["/**", "**/node_modules/**"], + "smartStep": true, "console": "integratedTerminal", "internalConsoleOptions": "neverOpen" }, { - "name": "vscode-jest-tests", + "name": "vitest: all core tests", "type": "node", - "runtimeVersion": "16.15.0", + "runtimeVersion": "24", "request": "launch", - "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen", "cwd": "${workspaceFolder}/web-frontend", - "program": "node_modules/.bin/jest", - "args": [ - "--config=jest.config.js", - "--runInBand", - "--watchAll=false", - ], + "program": "${workspaceFolder}/web-frontend/node_modules/vitest/vitest.mjs", + "args": ["run"], "env": { - "PRIVATE_BACKEND_URL": "http://localhost:8000" + "NODE_OPTIONS": "--max-old-space-size=8192" }, + "autoAttachChildProcesses": true, + "skipFiles": ["/**", "**/node_modules/**"], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen" }, ] } diff --git a/config/vscode/.vscode/settings.json b/config/vscode/.vscode/settings.json index b3a66ef4ff..aa0a09ed84 100644 --- a/config/vscode/.vscode/settings.json +++ b/config/vscode/.vscode/settings.json @@ -3,10 +3,7 @@ "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "python.testing.pytestArgs": ["backend"], - "jest.autoRun": "off", - "jest.rootPath": "web-frontend", - "jest.jestCommandLine": "node_modules/.bin/jest --config jest.config.js --runInBand --watchAll=false", - "coverage-gutters.coverageBaseDir": "**/*coverage", + "vitest.configSearchPatternExclude": "{**/node_modules/**,**/vendor/**,**/.*/**,**/*.d.ts,**/vitest.config.base.ts}", "coverage-gutters.coverageBaseDir": "**/*coverage", "coverage-gutters.showLineCoverage": true, "sqltools.connections": [ { diff --git a/config/vscode/vsc-extensions.txt b/config/vscode/vsc-extensions.txt index 721ac269b4..092471cdfd 100644 --- a/config/vscode/vsc-extensions.txt +++ b/config/vscode/vsc-extensions.txt @@ -8,7 +8,7 @@ ms-python.python ms-python.vscode-pylance mtxr.sqltools mtxr.sqltools-driver-pg -Orta.vscode-jest +vitest.explorer ryanluker.vscode-coverage-gutters sibiraj-s.vscode-scss-formatter stylelint.vscode-stylelint diff --git a/docs/development/directory-structure.md b/docs/development/directory-structure.md index 6af8b60ccd..61717f469b 100644 --- a/docs/development/directory-structure.md +++ b/docs/development/directory-structure.md @@ -84,12 +84,12 @@ web frontend. This whole directory is also added to the web-frontend container. `--target dev` to instead get a dev ready image. * `intellij-idea.webpack.config.js` a webpack config file that can be used by Intellij iDEA. It adds the correct aliases for the editor. -* `jest.config.js`: config file for running the tests with JEST. * `justfile`: contains commands to install dependencies, run the linter, and run the tests. * `nuxt.config.js`: base Nuxt config for the development environment. * `package.json`: main package config including all the dependencies for the web-frontend. +* `vitest.config.ts`: config file for running the tests with Vitest. * `yarn.lock`: auto generated file containing a list of the dependencies installed via yarn. diff --git a/docs/development/running-the-dev-env-locally.md b/docs/development/running-the-dev-env-locally.md index 05e4fde04e..0d039d328f 100644 --- a/docs/development/running-the-dev-env-locally.md +++ b/docs/development/running-the-dev-env-locally.md @@ -35,7 +35,7 @@ This guide covers running Baserow's backend and frontend natively on your machin curl -LsSf https://astral.sh/uv/install.sh | sh ``` -5. **Node.js 24** - For the frontend +5. **Node.js 24.15 or later (24.x)** - For the frontend ```bash # Using nvm (recommended) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash @@ -45,6 +45,10 @@ This guide covers running Baserow's backend and frontend natively on your machin # macOS with Homebrew brew install node@24 ``` + Older 24.x versions fail `yarn install` with `The engine "node" is incompatible + with this module`; run `nvm install 24` again (or `brew upgrade node@24`) to get + the latest 24.x. nvm keeps global packages per Node version, so run + `npm install -g yarn` again after switching. 6. **Yarn** - Frontend package manager ```bash npm install -g yarn @@ -169,7 +173,7 @@ just shell_plus ```bash # From project root (just f is shorthand for just frontend) just f lint # Run ESLint + Stylelint -just f test # Run Jest tests +just f test # Run Vitest tests just f fix # Auto-fix code style # From web-frontend/ @@ -281,8 +285,8 @@ just test-db stop ### Frontend Tests ```bash -just f test # Run Jest tests -just f test --watch # Watch mode +just f test # Run Vitest tests +just f yarn test:core # Watch mode (core tests; also test:premium, test:enterprise) ``` ## Database Operations diff --git a/docs/development/tools.md b/docs/development/tools.md index a99ae97e6c..f982a510f0 100644 --- a/docs/development/tools.md +++ b/docs/development/tools.md @@ -154,18 +154,17 @@ https://webpack.js.org/ https://sass-lang.com/ -### JEST +### Vitest -Because of its simplicity and compatibility with Vue and Nuxt we have chosen to include -JEST as the framework for the web frontend tests. Almost no code is covered yet so we -can definitely improve on that. The code is also tested in the continuous integration -pipeline. It can also be tested manually: +We use Vitest, with `@nuxt/test-utils`, as the framework for the web frontend tests. +The code is also tested in the continuous integration pipeline. It can also be tested +manually: ```bash just f test ``` -https://jestjs.io/ +https://vitest.dev/ ### Iconoir diff --git a/docs/development/vscode-setup.md b/docs/development/vscode-setup.md index 61afa08a33..5d8f6006a2 100644 --- a/docs/development/vscode-setup.md +++ b/docs/development/vscode-setup.md @@ -53,17 +53,18 @@ Install the following tools: run `backend/tests/baserow/core/test_core_models.py` for instance. 1. Now lets set up your frontend dev by changing directory to `baserow/web-frontend` 1. Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to install the correct version of `node`. - To determine the version of Node.js to use, see the `runtimeVersion` inside the - `launch.json` file. E.g. if the version is `v16.15.0`, you can install it with: - `nvm install v16.15.0` and then enable it with `nvm use v16.15.0`. Alternatively, - see `baserow/docs/installation/supported.md` to determine the supported version - of Node.js to use. + You need Node.js 24.15 or later in the 24.x line: install it with `nvm install 24` + and enable it with `nvm use 24`. Older 24.x versions fail `yarn install` with + `The engine "node" is incompatible with this module`; run `nvm install 24` again to + get the latest 24.x, then `npm install -g yarn` again (nvm keeps global packages + per Node version). See `baserow/docs/installation/supported.md` for the supported + versions of Node.js. 1. Install `yarn` globally: `npm install -g yarn` 1. Now run `just f install` to install dependencies (or `yarn install` directly). 1. Select "Trust Project" if you see an VSCode popup after running yarn install -1. If you do not see Jest tests in the testing menu: - 1. Type: Ctrl + Shift + P or open the command palette - 1. Type: Jest: Start All Runners +1. Install the [Vitest extension](https://marketplace.visualstudio.com/items?itemName=vitest.explorer) + (`vitest.explorer`). It finds the core, premium and enterprise Vitest configs and + lists their tests in the testing menu. 1. Confirm you can run a web-frontend unit test from vscode # Recommended Plugins @@ -76,7 +77,7 @@ Otherwise, you can manually install: 1. Eslint 1. Gitlab Workflow 1. Gitlens -1. Jest +1. Vitest 1. SCSS Formatter 1. Stylelint 1. Mypy diff --git a/docs/installation/supported.md b/docs/installation/supported.md index c982dcc063..4b4bb074da 100644 --- a/docs/installation/supported.md +++ b/docs/installation/supported.md @@ -17,7 +17,7 @@ Software versions are divided into the following groups: | Chrome | Latest | Latest | Latest | | Edge | Latest | Latest | Latest | | Python | >=3.14.0 | 3.14.8 | latest 3.14.x | -| Node.js | >= 24.0.0 | 24.22.1 | >= 24.0.0 | +| Node.js | >= 24.15.0 | 24.22.1 | latest 24.x | | Docker | >= 19.03 | Latest | Latest | | docker-compose | >= 1.19.0 | Latest | Latest | | PostgreSQL | >= 14 | 14 | 15+ | diff --git a/enterprise/web-frontend/jest.config.js b/enterprise/web-frontend/jest.config.js deleted file mode 100644 index 5aa6f814eb..0000000000 --- a/enterprise/web-frontend/jest.config.js +++ /dev/null @@ -1,61 +0,0 @@ -const path = require('path') - -module.exports = { - displayName: 'enterprise-unit', - testEnvironment: 'jsdom', - testMatch: ['/test/unit/**/*.spec.js'], - moduleFileExtensions: ['js', 'json', 'vue', '.mjs'], - moduleDirectories: [ - path.join(__dirname, '/../../web-frontend/node_modules/'), - ], - modulePaths: [path.join(__dirname, '/../../web-frontend/node_modules/')], - moduleNameMapper: { - '^@baserow/(.*)$': path.join(__dirname, '/../../web-frontend/$1'), - '^@baserow_premium/(.*)$': path.join( - __dirname, - '/../../premium/web-frontend/modules/baserow_premium/$1' - ), - '^@baserow_premium_test/(.*)$': path.join( - __dirname, - '/../../../premium/web-frontend/test/$1' - ), - '^@/(.*)$': path.join(__dirname, '/../../web-frontend/$1'), - '^~/(.*)$': path.join(__dirname, '/../../web-frontend/$1'), - '^vue$': path.join( - __dirname, - '/../../web-frontend/node_modules/vue/dist/vue.common.js' - ), - }, - transform: { - '^.+\\.(mjs|js)$': [ - 'babel-jest', - { - configFile: path.join(__dirname, '/../../web-frontend/babel.config.js'), - }, - ], - '^.+\\.vue$': '../../web-frontend/node_modules/@vue/vue2-jest', - '^.+\\.(gif|ico|jpg|jpeg|png|svg)$': - '../../web-frontend/test/helpers/stubFileTransformer.js', - }, - setupFilesAfterEnv: [ - path.join(__dirname, '/../../enterprise/web-frontend/jest.setup.js'), - ], - snapshotSerializers: [ - path.join( - __dirname, - '/../../web-frontend/node_modules/jest-serializer-vue' - ), - ], - coverageReporters: [ - 'text-summary', - ['cobertura', { projectRoot: '/baserow/' }], - ], - collectCoverageFrom: [ - '**/*.{js,Vue,vue}', - '!**/node_modules/**', - '!**/.nuxt/**', - '!**/reports/**', - '!**/test/**', - '!**/generated/**', - ], -} diff --git a/premium/web-frontend/jest.config.js b/premium/web-frontend/jest.config.js deleted file mode 100644 index 7769a0926f..0000000000 --- a/premium/web-frontend/jest.config.js +++ /dev/null @@ -1,65 +0,0 @@ -const path = require('path') - -module.exports = { - displayName: 'premium-unit', - testEnvironment: 'jsdom', - testMatch: ['/test/unit/**/*.spec.js'], - moduleFileExtensions: ['js', 'json', 'vue', '.mjs'], - moduleDirectories: [ - path.join(__dirname, '/../../web-frontend/node_modules/'), - ], - modulePaths: [path.join(__dirname, '/../../web-frontend/node_modules/')], - moduleNameMapper: { - '^@baserow/(.*).(scss|sass)$': path.join( - __dirname, - '/../../web-frontend/test/helpers/scss.js' - ), - '^@baserow/(.*)$': path.join(__dirname, '/../../web-frontend/$1'), - '^@baserow_premium/(.*)$': path.join( - __dirname, - '/../../premium/web-frontend/modules/baserow_premium/$1' - ), - '^@baserow_premium_test/(.*)$': path.join( - __dirname, - '/../../premium/web-frontend/test/$1' - ), - '^@/(.*)$': path.join(__dirname, '/../../web-frontend/$1'), - '^~/(.*)$': path.join(__dirname, '/../../web-frontend/$1'), - '^vue$': path.join( - __dirname, - '/../../web-frontend/node_modules/vue/dist/vue.common.js' - ), - }, - transform: { - '^.+\\.(mjs|js)$': [ - 'babel-jest', - { - configFile: path.join(__dirname, '/../../web-frontend/babel.config.js'), - }, - ], - '^.+\\.vue$': '../../web-frontend/node_modules/@vue/vue2-jest', - '^.+\\.(gif|ico|jpg|jpeg|png|svg)$': - '../../web-frontend/test/helpers/stubFileTransformer.js', - }, - setupFilesAfterEnv: [ - path.join(__dirname, '/../../premium/web-frontend/jest.setup.js'), - ], - snapshotSerializers: [ - path.join( - __dirname, - '/../../web-frontend/node_modules/jest-serializer-vue' - ), - ], - coverageReporters: [ - 'text-summary', - ['cobertura', { projectRoot: '/baserow/' }], - ], - collectCoverageFrom: [ - '**/*.{js,Vue,vue}', - '!**/node_modules/**', - '!**/.nuxt/**', - '!**/reports/**', - '!**/test/**', - '!**/generated/**', - ], -} diff --git a/web-frontend/coverage.config.js b/web-frontend/coverage.config.js deleted file mode 100644 index b340332a22..0000000000 --- a/web-frontend/coverage.config.js +++ /dev/null @@ -1,25 +0,0 @@ -const path = require('path') - -// Setting reporters on the command line does not work so enable via this env variable -// we have to set anyway when using the junit reporter in CI. -const junitReporterConfig = process.env.JEST_JUNIT_OUTPUT_DIR - ? { - reporters: ['default', path.join(__dirname, '/node_modules/jest-junit')], - } - : {} - -module.exports = { - coverageReporters: [ - 'text-summary', - ['cobertura', { projectRoot: '/baserow/' }], - ], - collectCoverageFrom: [ - '/modules/**/*.{js,Vue,vue}', - '!**/node_modules/**', - '!**/.nuxt/**', - '!**/reports/**', - '!**/test/**', - '!**/generated/**', - ], - ...junitReporterConfig, -} diff --git a/web-frontend/jest.config.js b/web-frontend/jest.config.js deleted file mode 100644 index 0432a5a3e4..0000000000 --- a/web-frontend/jest.config.js +++ /dev/null @@ -1,26 +0,0 @@ -const coverageConfig = require('./coverage.config.js') -const path = require('path') - -module.exports = { - testEnvironment: 'jsdom', - testMatch: ['/test/unit/**/*.spec.js'], - moduleFileExtensions: ['js', 'json', 'vue', '.mjs'], - moduleNameMapper: { - '^@baserow/(.*).(scss|sass)$': '/test/helpers/scss.js', - '^@baserow/(.*)$': '/$1', - '^@baserow_test_cases/(.*)$': path.join(__dirname, '../tests/cases/$1'), - '^@/(.*)$': '/$1', - '^~/(.*)$': '/$1', - '^vue$': '/node_modules/vue/dist/vue.common.js', - }, - transform: { - '^.+\\.(mjs|js)$': 'babel-jest', - '^.+\\.vue$': '@vue/vue2-jest', - '^.+\\.(gif|ico|jpg|jpeg|png|svg)$': - '/test/helpers/stubFileTransformer.js', - }, - setupFilesAfterEnv: ['/jest.setup.js'], - snapshotSerializers: ['/node_modules/jest-serializer-vue'], - cacheDirectory: '/.cache/jest', - ...coverageConfig, -}