Skip to content

Commit

Permalink
Merge pull request #970 from RedHatInsights/release_stage-stable.12413
Browse files Browse the repository at this point in the history
Deployment commit for stage-stable
  • Loading branch information
dlabrecq authored Jan 30, 2024
2 parents 43c578f + 2ea6ead commit 32d2fc9
Show file tree
Hide file tree
Showing 30 changed files with 2,292 additions and 1,654 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions .archive/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
clearMocks: true,
collectCoverage: false,
collectCoverageFrom: ['src/**/*.tsx'],
coverageDirectory: './coverage/',
fakeTimers: {
enableGlobally: true,
},
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleDirectories: ['node_modules', '<rootDir>/src'],
moduleNameMapper: {
'\\.(css|less|sass|scss)$': '<rootDir>/test/styleMock.js',
},
roots: ['<rootDir>/src'],
setupFiles: ['<rootDir>/test/testEnv.ts'],
testEnvironment: 'jest-environment-jsdom',
testEnvironmentOptions: {
url: 'http://localhost/',
},
testRegex: '\\.test\\.(jsx?|tsx?)$',
transform: {
'^.+\\.[jt]sx?$': '<rootDir>/test/transformTS.js',
'^.+\\.(jpg)$': '<rootDir>/test/transformFile.js',
},
transformIgnorePatterns: ['node_modules/(?!@patternfly/react-icons/dist/esm)'],
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
59 changes: 59 additions & 0 deletions .archive/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//{
// "compilerOptions": {
// "allowJs": true,
// "allowSyntheticDefaultImports": true,
// "baseUrl": "./src",
// "esModuleInterop": true,
// "forceConsistentCasingInFileNames": true,
// >>> "isolatedModules": false,
// "jsx": "react",
// >>> "lib": [
// "dom",
// "es2017"
// ],
// "module": "esnext",
// "moduleResolution": "node",
// >>> "noUnusedLocals": true,
// "resolveJsonModule": true,
// "sourceMap": true,
// >>> "target": "es2017"
// },
// "include": [
// "./src/**/*.ts*",
// "./test/**/*"
// ],
// >>> "exclude": [
// "./node_modules/**",
// "./src/**/*.test.ts*",
// "./src/__mocks__/*"
// ]
//}

{
"compilerOptions": {
"baseUrl": "./src",
"outDir": "./dist/",
"sourceMap": true,
// "noImplicitAny": true,
"module": "esnext",
"target": "esnext",
"jsx": "react",
"allowJs": true,
"moduleResolution": "node",
"removeComments": false,
// "strict": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"types": ["node", "jest", "@testing-library/jest-dom"],
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.js",
"src/**/*.jsx"
]
}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ dist/
report.*.json
locales/*[en|de|fr].json
.vscode/
.swc/
48 changes: 35 additions & 13 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
const transformIgnorePatterns = [
'node_modules/(?!(@patternfly/react-core/src|@patternfly/react-icons/dist/esm|uuid/dist/esm-browser))',
];

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
clearMocks: true,
collectCoverage: false,
collectCoverageFrom: ['src/**/*.tsx'],
coverageDirectory: './coverage/',
// collectCoverageFrom: ['src/**/*.js'],
// coverageDirectory: './coverage/',
fakeTimers: {
enableGlobally: true,
},
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleDirectories: ['node_modules', '<rootDir>/src'],
moduleNameMapper: {
'\\.(css|less|sass|scss)$': '<rootDir>/test/styleMock.js',
'\\.(css|scss)$': 'identity-obj-proxy',
},
roots: ['<rootDir>/src'],
preset: 'ts-jest',
roots: ['<rootDir>/src/'],
setupFiles: ['<rootDir>/test/testEnv.ts'],
testEnvironment: 'jest-environment-jsdom',
testEnvironmentOptions: {
url: 'http://localhost/',
},
testRegex: '\\.test\\.(jsx?|tsx?)$',
setupFilesAfterEnv: ['<rootDir>/test/jest.setup.js'],
testEnvironment: 'jsdom',
transformIgnorePatterns,
transform: {
'^.+\\.[jt]sx?$': '<rootDir>/test/transformTS.js',
'^.+\\.(jpg)$': '<rootDir>/test/transformFile.js',
'^.+\\.svg$': 'jest-transform-stub',
'^.+\\.(ts|js)x?$': [
'@swc/jest',
{
$schema: 'http://json.schemastore.org/swcrc',
jsc: {
experimental: {
plugins: [['jest_workaround', {}]],
},
parser: {
jsx: true,
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
},
transformIgnorePatterns: ['node_modules/(?!@patternfly/react-icons/dist/esm)'],
};
Loading

0 comments on commit 32d2fc9

Please sign in to comment.