File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ module.exports = {
5858 // By default jest does not transform anything in node_modules
5959 // So this override excludes node_modules except @gravity -ui
6060 // see https://github.com/timarney/react-app-rewired/issues/241
61- config . transformIgnorePatterns = [ 'node_modules/(?!(@gravity-ui)/)' ] ;
61+ config . transformIgnorePatterns = [ 'node_modules/(?!(@gravity-ui|@mjackson )/)' ] ;
6262
6363 // Add .github directory to roots
6464 config . roots = [ '<rootDir>/src' , '<rootDir>/.github' ] ;
Original file line number Diff line number Diff line change 1- // eslint-disable-next-line import/no-extraneous-dependencies
21import { parseMultipart } from '@mjackson/multipart-parser' ;
32import qs from 'qs' ;
43
Original file line number Diff line number Diff line change 1- /* eslint-disable import/order */
1+ /* eslint-disable import/order, no-undef */
22// jest-dom adds custom jest matchers for asserting on DOM nodes.
33// allows you to do things like:
44// expect(element).toHaveTextContent(/react/i)
@@ -14,3 +14,8 @@ configureUiKit({lang: Lang.En});
1414// only to prevent warnings from history lib
1515// all api calls in tests should be mocked
1616window . custom_backend = '/' ;
17+
18+ // Mock multipart-parser globally for all tests
19+ jest . mock ( '@mjackson/multipart-parser' , ( ) => ( {
20+ parseMultipart : jest . fn ( ) ,
21+ } ) ) ;
You can’t perform that action at this time.
0 commit comments