@@ -15,8 +15,9 @@ describe('module CORS allowlist config', function () {
1515
1616 expect ( content ) . to . include ( `cors:"${ DEFAULT_ORIGIN } "` ) ;
1717 expect ( content ) . to . include ( 'argument="cors={{{cors}}}"' ) ;
18- expect ( content . match ( / a r g u m e n t = " c o r s = \{ \{ \{ c o r s \} \} \} " / g) ) . to . have
19- . length ( 2 ) ;
18+ expect (
19+ content . match ( / a r g u m e n t = " c o r s = \{ \{ \{ c o r s \} \} \} " / g) ,
20+ ) . to . have . length ( 2 ) ;
2021 }
2122 } ) ;
2223
@@ -36,15 +37,6 @@ describe('module CORS allowlist config', function () {
3637 }
3738 } ) ;
3839
39- it ( 'adds the default CORS argument to the Loon module' , function ( ) {
40- const content = readConfig ( 'Loon.plugin' ) ;
41-
42- expect ( content ) . to . include (
43- `cors=input, "${ DEFAULT_ORIGIN } ", tag=CORS允许来源` ,
44- ) ;
45- expect ( content . match ( / a r g u m e n t = " c o r s = \{ c o r s \} " / g) ) . to . have . length ( 2 ) ;
46- } ) ;
47-
4840 it ( 'does not set legacy non-parameterized modules to wildcard CORS' , function ( ) {
4941 for ( const filename of [
5042 'QX.snippet' ,
@@ -60,7 +52,10 @@ describe('module CORS allowlist config', function () {
6052} ) ;
6153
6254function readConfig ( filename ) {
63- return fs . readFileSync ( path . join ( findRepoRoot ( ) , 'config' , filename ) , 'utf8' ) ;
55+ return fs . readFileSync (
56+ path . join ( findRepoRoot ( ) , 'config' , filename ) ,
57+ 'utf8' ,
58+ ) ;
6459}
6560
6661function findRepoRoot ( ) {
0 commit comments