File tree Expand file tree Collapse file tree 3 files changed +22
-18
lines changed
react-scripts/config/jest Expand file tree Collapse file tree 3 files changed +22
-18
lines changed Original file line number Diff line number Diff line change 88 "@testing-library/user-event" : " ^14.6.1" ,
99 "@types/testing-library__jest-dom" : " ^6.0.0" ,
1010 "jest" : " ^30.0.5" ,
11+ "jest-environment-jsdom" : " ^30.0.5" ,
12+ "jest-watch-typeahead" : " ^3.0.1" ,
1113 "eslint" : " ^9.32.0"
1214 }
1315 }
Original file line number Diff line number Diff line change 1313
1414module . exports = {
1515 process ( ) {
16- return 'module.exports = {};' ;
16+ return { code : 'module.exports = {};' } ;
1717 } ,
1818 getCacheKey ( ) {
1919 // The output is always the same.
Original file line number Diff line number Diff line change @@ -17,24 +17,26 @@ module.exports = {
1717 pascalCase : true ,
1818 } ) ;
1919 const componentName = `Svg${ pascalCaseFilename } ` ;
20- return `const React = require('react');
21- module.exports = {
22- __esModule: true,
23- default: ${ assetFilename } ,
24- ReactComponent: React.forwardRef(function ${ componentName } (props, ref) {
25- return {
26- $$typeof: Symbol.for('react.element'),
27- type: 'svg',
28- ref: ref,
29- key: null,
30- props: Object.assign({}, props, {
31- children: ${ assetFilename }
32- })
33- };
34- }),
35- };` ;
20+ return {
21+ code : `const React = require('react');
22+ module.exports = {
23+ __esModule: true,
24+ default: ${ assetFilename } ,
25+ ReactComponent: React.forwardRef(function ${ componentName } (props, ref) {
26+ return {
27+ $$typeof: Symbol.for('react.element'),
28+ type: 'svg',
29+ ref: ref,
30+ key: null,
31+ props: Object.assign({}, props, {
32+ children: ${ assetFilename }
33+ })
34+ };
35+ }),
36+ };` ,
37+ } ;
3638 }
3739
38- return `module.exports = ${ assetFilename } ;` ;
40+ return { code : `module.exports = ${ assetFilename } ;` } ;
3941 } ,
4042} ;
You can’t perform that action at this time.
0 commit comments