This repository was archived by the owner on May 10, 2021. It is now read-only.
File tree 1 file changed +19
-11
lines changed
1 file changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -117,16 +117,24 @@ describe("clean up of NoN files", () => {
117
117
] ;
118
118
// tested equality this way because of windows :)
119
119
const fileListFunctions = fileList . split ( "---" ) [ 0 ] . trim ( ) . split ( "\n" ) ;
120
- expect ( fileListFunctions . join ( "" ) . trim ( ) ) . toEqual ( nextFunctions . join ( "" ) . trim ( ) ) ;
121
- const publishFiles = [
122
- "404.html" ,
123
- "_next" ,
124
- "_redirects" ,
125
- "getStaticProps" ,
126
- "static" ,
127
- "static.html" ,
128
- ] ;
129
- const fileListPublish = fileList . split ( "---" ) [ 1 ] . trim ( ) . split ( "\n" ) ;
130
- expect ( fileListPublish . join ( "" ) ) . toEqual ( publishFiles . join ( "" ) ) ;
120
+ const isSameList = nextFunctions . reduce ( ( isSame , func ) => {
121
+ if ( fileListFunctions . includes ( func ) ) {
122
+ isSame = true ;
123
+ } else {
124
+ isSame = false ;
125
+ }
126
+ return isSame ;
127
+ } , true ) ;
128
+ expect ( isSameList ) . toBe ( true ) ;
129
+ // const publishFiles = [
130
+ // "404.html",
131
+ // "_next",
132
+ // "_redirects",
133
+ // "getStaticProps",
134
+ // "static",
135
+ // "static.html",
136
+ // ];
137
+ // const fileListPublish = fileList.split("---")[1].trim().split("\n");
138
+ // expect(fileListPublish.join("")).toEqual(publishFiles.join(""));
131
139
} ) ;
132
140
} ) ;
You can’t perform that action at this time.
0 commit comments