@@ -13,28 +13,28 @@ var config = {
1313 Uin : process . env . Uin ,
1414} ;
1515
16- console . log ( 'process' , process ) ;
17- console . log ( ' process.env' , process . env ) ;
18-
19- if ( ! process . env . Bucket ) {
20- console . warn ( '环境变量里未找到Bucket,请检查' ) ;
21- return ;
22- }
23- if ( ! process . env . Region ) {
24- console . warn ( '环境变量里未找到Region,请检查' ) ;
25- return ;
26- }
27- if ( ! process . env . ReplicationBucket ) {
28- console . warn ( '环境变量里未找到ReplicationBucket,请检查' ) ;
29- return ;
30- }
31- if ( ! process . env . ReplicationRegion ) {
32- console . warn ( '环境变量里未找到ReplicationRegion,请检查' ) ;
33- return ;
34- }
35- if ( ! process . env . Uin ) {
36- console . warn ( '环境变量里未找到Uin,请检查' ) ;
37- return ;
16+ function checkEnvParams ( ) {
17+ if ( ! process . env . Bucket ) {
18+ console . warn ( '环境变量里未找到Bucket,请检查' ) ;
19+ return ;
20+ }
21+ if ( ! process . env . Region ) {
22+ console . warn ( '环境变量里未找到Region,请检查' ) ;
23+ return ;
24+ }
25+ if ( ! process . env . ReplicationBucket ) {
26+ console . warn ( '环境变量里未找到ReplicationBucket,请检查' ) ;
27+ return ;
28+ }
29+ if ( ! process . env . ReplicationRegion ) {
30+ console . warn ( '环境变量里未找到ReplicationRegion,请检查' ) ;
31+ return ;
32+ }
33+ if ( ! process . env . Uin ) {
34+ console . warn ( '环境变量里未找到Uin,请检查' ) ;
35+ return ;
36+ }
37+ return true ;
3838}
3939
4040var util = {
@@ -167,6 +167,7 @@ if (match) {
167167}
168168
169169var group = function ( name , fn ) {
170+ if ( ! checkEnvParams ( ) ) return ;
170171 console . log ( `${ name } 进行中....` ) ;
171172 describe ( name , function ( ) {
172173 jest . setTimeout ( 60 * 1000 ) ;
0 commit comments