File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
scripts/webframeworks-deploy-tests Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -388,6 +388,23 @@ describe("webframeworks", function (this) {
388
388
expect ( unmatchedFiles , "matchedFiles" ) . to . eql ( [ ] ) ;
389
389
expect ( unmatchedExpectations , "unmatchedExpectations" ) . to . eql ( [ ] ) ;
390
390
} ) ;
391
+
392
+ it ( "should not have development files to be deployed" , async ( ) => {
393
+ const distDir = ".next" ;
394
+
395
+ const UNEXPECTED_PATTERNS = [
396
+ `${ distDir } \/cache\/.*-development` ,
397
+ `${ distDir } \/cache\/eslint` ,
398
+ ] . map ( ( it ) => new RegExp ( it ) ) ;
399
+
400
+ const files = await getFilesListFromDir ( `${ NEXT_OUTPUT_PATH } /functions/${ distDir } ` ) ;
401
+
402
+ const filesContainingUnexpectedPatterns = UNEXPECTED_PATTERNS . filter ( ( unexpectedPattern ) =>
403
+ files . some ( ( file ) => file . match ( unexpectedPattern ) ) ,
404
+ ) ;
405
+
406
+ expect ( filesContainingUnexpectedPatterns . length ) . to . eql ( 0 ) ;
407
+ } ) ;
391
408
} ) ;
392
409
393
410
describe ( "angular" , ( ) => {
You can’t perform that action at this time.
0 commit comments