Files
Jack Westbrook b707cd28f1 Frontend: Move toEmit jest matchers to shared workspace (#108610)
* feat(test-utils): move the toEmitValue/s jest matchers to test-utils and add test script

* chore(jest): update configs to use matchers from test-utils package

* ci(frontend-tests): hook up packages tests

* fix(test-utils): re-export matchers from index.ts so packages that include setupTests don't error

* ci(pr-frontend-unit-tests): add frontend-packages-unit-tests to list of required unit tests

* Update packages/grafana-test-utils/README.md

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2025-07-30 14:39:44 +02:00

30 lines
761 B
JavaScript

process.env.TZ = 'Pacific/Easter'; // UTC-06:00 or UTC-05:00 depending on daylight savings
export default {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
testMatch: ['<rootDir>/**/__tests__/**/*.{js,jsx,ts,tsx}', '<rootDir>/**/*.{spec,test,jest}.{js,jsx,ts,tsx}'],
testEnvironment: 'node',
transform: {
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
sourceMaps: 'inline',
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
decorators: false,
dynamicImport: true,
},
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
},
};