Skip to content
Snippets Groups Projects
  • Nemanja Glumac's avatar
    cdddc69b
    Upgrade jest to the latest major version 29 (#26566) · cdddc69b
    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: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
    Upgrade jest to the latest major version 29 (#26566)
    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: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
jest.tz.unit.conf.json 1.13 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",
    "^d3-(.*)$": "<rootDir>/node_modules/d3-$1/dist/d3-$1"
  },
  "testMatch": ["<rootDir>/frontend/test/**/*.tz.unit.spec.{js,ts,jsx,tsx}"],
  "modulePaths": ["<rootDir>/frontend/test", "<rootDir>/frontend/src"],
  "setupFiles": [
    "<rootDir>/frontend/test/jest-setup.js",
    "<rootDir>/frontend/test/metabase-bootstrap.js",
    "<rootDir>/frontend/test/register-visualizations.js"
  ],
  "globals": {
    "ace": {},
    "ga": {},
    "document": {}
  },
  "coverageDirectory": "./",
  "coverageReporters": ["text", "json-summary"],
  "collectCoverageFrom": ["frontend/src/**/*.{js,ts,jsx,tsx}"],
  "coveragePathIgnorePatterns": [
    "/node_modules/",
    "/frontend/src/metabase/visualizations/lib/errors.js"
  ],
  "testEnvironment": "jest-environment-jsdom"
}