Files
teleport/jest.config.js
T
dependabot[bot]andGrzegorz Zdunek 7700313266 Bump react-router from 7.15.1 to 8.1.0 (#68299)
* Bump react-router from 7.15.1 to 8.1.0

Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.15.1 to 8.1.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Revert unnecessary updates

* Add `react-router` to jest ES Modules

* Add `babel-plugin-transform-vite-meta-hot`

* Add `cookie-es` to jest ES Modules

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Grzegorz Zdunek <[email protected]>
2026-07-07 08:06:20 +00:00

63 lines
1.7 KiB
JavaScript

const config = require('@gravitational/build/jest/config');
process.env.TZ = 'UTC';
const esModules = [
'strip-ansi',
'ansi-regex',
'cookie-es',
'd3-color',
'd3-scale',
'd3-interpolate',
'd3-time-format',
'd3-array',
'd3-format',
'd3-time',
'd3-shape',
'd3-path',
'internmap',
'@nivo/bar',
'react-error-boundary',
'react-router',
'until-async',
'@exodus/bytes',
'rettime',
'@open-draft/deferred-promise',
'@gravitational/design-system',
].join('|');
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
...config,
maxWorkers: '75%',
workerIdleMemoryLimit: '1GB',
globals: {
electron: {},
},
collectCoverageFrom: [
// comment out until shared directory is finished testing
// '**/packages/design/src/**/*.jsx',
'**/packages/shared/components/**/*.jsx',
],
// Copied from https://jestjs.io/docs/configuration#transformignorepatterns-arraystring
// Because in pnpm packages are symlinked to node_modules/.pnpm,
// we need to transform packages in that directory.
// We use a relative pattern to match the second 'node_modules/' in
// 'node_modules/.pnpm/@[email protected]/node_modules/@scope/pkg-b/'.
transformIgnorePatterns: [`node_modules/(?!.pnpm|${esModules})`],
transform: {
'\\.[jt]sx?$': 'babel-jest', // This is the default transform.
'\\.mjs$': 'babel-jest',
},
coverageReporters: ['text-summary', 'lcov'],
testPathIgnorePatterns: ['e2e'],
testEnvironmentOptions: {
customExportConditions: [''],
},
setupFilesAfterEnv: [
'<rootDir>/web/packages/build/jest/setupTests.ts',
'<rootDir>/web/packages/build/jest/customMatchers.ts',
'<rootDir>/web/packages/build/jest/canvasMock.ts',
],
};