File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -90,19 +90,19 @@ describe('wxml-loader', () => {
90
90
) ;
91
91
} ) ;
92
92
93
- test ( 'should formatContent () work' , async ( ) => {
93
+ test ( 'should transformContent () work' , async ( ) => {
94
94
await compile ( '<view wx:for="{{items}}"> {{item}} </view>' , {
95
95
target : function Alipay ( ) { } ,
96
- formatContent : ( content ) => content . replace ( / \b w x : / , '🦄:' ) ,
96
+ transformContent : ( content ) => content . replace ( / \b w x : / , '🦄:' ) ,
97
97
} ) ;
98
98
const result = readFile ( ) ;
99
99
expect ( result ) . toBe ( '<view 🦄:for="{{items}}"> {{item}} </view>' ) ;
100
100
} ) ;
101
101
102
- test ( 'should formatUrl () work' , async ( ) => {
102
+ test ( 'should transformUrl () work' , async ( ) => {
103
103
await compile ( '<import src="/fixture.wxml" />' , {
104
104
target : function Alipay ( ) { } ,
105
- formatUrl : ( url ) => url . replace ( / f i x t u r e / , '🦄' ) ,
105
+ transformUrl : ( url ) => url . replace ( / f i x t u r e / , '🦄' ) ,
106
106
} ) ;
107
107
const result = readFile ( ) ;
108
108
expect ( result ) . toBe ( '<import src="/🦄.wxml" />' ) ;
You can’t perform that action at this time.
0 commit comments