mirror of
https://github.com/grafana/grafana.git
synced 2025-09-15 13:02:53 +08:00

* 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>
30 lines
761 B
JavaScript
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',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
};
|