-
Nemanja Glumac authored
* Upgrade `jest` to the latest version (29.3.1) * Add `jest-environment-jsdom` as a separate package This was a breaking change since the version 28 * Upgrade `@types/jest` to the latest version * Upgrade `babel-jest` to the latest version * Upgrade `@testing-library/jest-dom` to the latest version * Upgrade `@types/testing-library__jest-dom` to the latest version * Upgrade `jest-localstorage-mock` to the latest version * Upgrade `jest-watch-typeahead` to the latest version * fix jest config for v29 * fix specs Co-authored-by:
Aleksandr Lesnenko <alxnddr@gmail.com>
Nemanja Glumac authored* Upgrade `jest` to the latest version (29.3.1) * Add `jest-environment-jsdom` as a separate package This was a breaking change since the version 28 * Upgrade `@types/jest` to the latest version * Upgrade `babel-jest` to the latest version * Upgrade `@testing-library/jest-dom` to the latest version * Upgrade `@types/testing-library__jest-dom` to the latest version * Upgrade `jest-localstorage-mock` to the latest version * Upgrade `jest-watch-typeahead` to the latest version * fix jest config for v29 * fix specs Co-authored-by:
Aleksandr Lesnenko <alxnddr@gmail.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
jest.unit.conf.json 1.78 KiB
{
"moduleNameMapper": {
"\\.(css|less)$": "<rootDir>/frontend/test/__mocks__/styleMock.js",
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/frontend/test/__mocks__/fileMock.js",
"^promise-loader\\?global\\!metabase-lib\\/metadata\\/utils\\/ga-metadata$": "<rootDir>/frontend/src/metabase-lib/metadata/utils/ga-metadata.js",
"ace/ext-searchbox": "<rootDir>/frontend/test/__mocks__/aceSearchBoxExtMock.js",
"^d3-(.*)$": "<rootDir>/node_modules/d3-$1/dist/d3-$1"
},
"testPathIgnorePatterns": [
"<rootDir>/frontend/test/.*/.*.tz.unit.spec.{js,jsx,ts,tsx}"
],
"testMatch": [
"<rootDir>/**/*.unit.spec.js",
"<rootDir>/**/*.unit.spec.{js,jsx,ts,tsx}"
],
"modulePaths": [
"<rootDir>/frontend/test",
"<rootDir>/frontend/src",
"<rootDir>/enterprise/frontend/src"
],
"setupFiles": [
"<rootDir>/frontend/test/jest-setup.js",
"<rootDir>/frontend/test/metabase-bootstrap.js",
"<rootDir>/frontend/test/register-visualizations.js"
],
"setupFilesAfterEnv": ["@testing-library/jest-dom/extend-expect"],
"globals": {
"ace": {},
"ga": {},
"document": {}
},
"coverageDirectory": "./coverage",
"coverageReporters": ["text", "html", "lcov"],
"collectCoverageFrom": [
"frontend/src/**/*.{js,jsx,ts,tsx}",
"enterprise/frontend/src/**/*.{js,jsx,ts,tsx}",
"**/*.stories.{js,jsx,ts,tsx}"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"/frontend/src/metabase/visualizations/lib/errors.js",
"/frontend/src/cljs/",
"/frontend/src/metabase/internal/",
"/frontend/test/",
".styled.{jsx,tsx}",
".info.js"
],
"testEnvironment": "jest-environment-jsdom",
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
]
}