@@ -5,9 +5,9 @@ module.exports = {
5
5
verbose : true ,
6
6
coverageDirectory : './coverage/' ,
7
7
collectCoverage : true ,
8
+ // most of these are to fix https://github.com/remarkjs/react-markdown/issues/635
8
9
transformIgnorePatterns : [
9
- 'node_modules/(?!@patternfly|@data-driven-forms)' ,
10
-
10
+ 'node_modules/(?!@patternfly|@data-driven-forms|react-syntax-highlighter|remark-gfm|react-markdown|remark-parse|devlop|hast-util-to-jsx-runtime|comma-separated-tokens|estree-util-is-identifier-name|hast-util-whitespace|property-information|space-separated-tokens|unist-util-position|vfile-message|unist-util-stringify-position|html-url-attributes|mdast-util-from-markdown|mdast-util-to-string|micromark|decode-named-character-reference|remark-rehype|mdast-util-to-hast|trim-lines|unist-util-visit|unist-util-is|unified|bail|is-plain-obj|trough|vfile|mdast-util-gfm|ccount|mdast-util-find-and-replace|escape-string-regexp|markdown-table|mdast-util-to-markdown|zwitch|longest-streak|mdast-util-phrasing)'
11
11
// Uncomment the below line if you face any errors with jest
12
12
// '/node_modules/(?!@redhat-cloud-services)',
13
13
] ,
@@ -17,14 +17,15 @@ module.exports = {
17
17
'!<rootDir>/packages/**/index.js' ,
18
18
'!<rootDir>/packages/**/*{c|C}ontext*.js' ,
19
19
'!<rootDir>/packages/components/src/Components/Table/*' ,
20
+ '<rootDir>/packages/**/src/**/*.tsx'
20
21
] ,
21
- setupFilesAfterEnv : [ '<rootDir>/config/setupTests.js' , 'jest-canvas-mock' ] ,
22
+ setupFilesAfterEnv : [ '<rootDir>/config/setupTests.js' , 'jest-canvas-mock' ] ,
22
23
testEnvironment : 'jsdom' ,
23
24
testEnvironmentOptions : {
24
- url : 'http://localhost:5000/' ,
25
+ url : 'http://localhost:5000/'
25
26
} ,
26
- setupFiles : [ './jest.setup.js' ] ,
27
- roots : [ '<rootDir>/packages/' ] ,
27
+ setupFiles : [ './jest.setup.js' ] ,
28
+ roots : [ '<rootDir>/packages/' ] ,
28
29
// modulePathIgnorePatterns: ['<rootDir>/packages/create-crc-app/templates', '<rootDir>/packages/docs/.cache'],
29
30
modulePathIgnorePatterns : [
30
31
'<rootDir>/packages/*.*/dist/*.*' ,
@@ -37,11 +38,13 @@ module.exports = {
37
38
customReact : 'react' ,
38
39
reactRedux : 'react-redux' ,
39
40
PFReactCore : '@patternfly/react-core' ,
40
- PFReactTable : '@patternfly/react-table' ,
41
+ PFReactTable : '@patternfly/react-table'
41
42
} ,
42
43
globalSetup : '<rootDir>/config/globalSetup.js' ,
43
44
transform : {
44
45
'^.+\\.jsx?$' : 'babel-jest' ,
45
- '^.+\\.tsx?$' : [ 'ts-jest' , { tsconfig : './packages/module/tsconfig.json' , } ] ,
46
- } ,
46
+ '^.+\\.tsx?$' : [ 'ts-jest' , { tsconfig : './packages/module/tsconfig.json' } ] ,
47
+ // Ensure ES modules are transformed
48
+ '^.+\\.js$' : 'babel-jest'
49
+ }
47
50
} ;
0 commit comments