File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 4343 "@umijs/fabric" : " ^3.0.0" ,
4444 "babel-plugin-module-resolver" : " ^4.1.0" ,
4545 "babel-preset-umi" : " ^1.8.4" ,
46+ "chalk" : " ^5.1.2" ,
4647 "core-js" : " ^3.25.5" ,
4748 "fs-extra" : " ^10.1.0" ,
4849 "jest" : " ^29.2.1" ,
Original file line number Diff line number Diff line change 1+ import chalk from 'chalk' ;
2+ import fs from 'fs-extra' ;
13import { runCLI } from 'jest' ;
24import path from 'path' ;
3- import fs from 'fs-extra' ;
45
56const ALIAS = {
67 t : 'testNamePattern' ,
@@ -15,6 +16,16 @@ export function getConfig() {
1516 const setupFiles = [ require . resolve ( './setup.js' ) ] ;
1617
1718 if ( pkg . devDependencies [ 'enzyme' ] ) {
19+ if (
20+ ! pkg . dependencies [ 'enzyme-adapter-react-16' ] &&
21+ ! pkg . devDependencies [ 'enzyme-adapter-react-16' ]
22+ ) {
23+ console . log (
24+ chalk . red (
25+ '[rc-test] Legacy "enzyme-adapter-react-16" is not in the deps. Please install in dev deps!' ,
26+ ) ,
27+ ) ;
28+ }
1829 setupFiles . push ( require . resolve ( './setupEnzyme.js' ) ) ;
1930 }
2031
You can’t perform that action at this time.
0 commit comments