@@ -3051,7 +3051,8 @@ test("manifestEnhancer#getSupportedLocales", async (t) => {
3051
3051
"../../../../../../../../../../../../resources/sap/ui/demo/app/i18n/i18n.properties"
3052
3052
) , expectedLocales ) ;
3053
3053
3054
- t . is ( fs . readdir . callCount , 4 ) ;
3054
+ // findSupportedLocales caches requests, so for the same bundle readdir is only called once
3055
+ t . is ( fs . readdir . callCount , 1 ) ;
3055
3056
3056
3057
t . true ( t . context . logVerboseSpy . notCalled , "No verbose messages should be logged" ) ;
3057
3058
t . true ( t . context . logWarnSpy . notCalled , "No warnings should be logged" ) ;
@@ -3101,18 +3102,18 @@ test("manifestEnhancer#getSupportedLocales (invalid locales)", async (t) => {
3101
3102
3102
3103
t . is ( fs . readdir . callCount , 1 ) ;
3103
3104
3104
- t . is ( t . context . logVerboseSpy . callCount , 5 ) ;
3105
- t . is ( t . context . logVerboseSpy . getCall ( 0 ) . args [ 0 ] ,
3106
- "Skipping invalid locale 'en -US' for bundle 'i18n/i18n.properties'" ) ;
3107
- t . is ( t . context . logVerboseSpy . getCall ( 1 ) . args [ 0 ] ,
3108
- "Skipping invalid locale 'zh_CN_ ' for bundle 'i18n/i18n.properties'" ) ;
3109
- t . is ( t . context . logVerboseSpy . getCall ( 2 ) . args [ 0 ] ,
3110
- "Skipping invalid locale 'sr_Latn_RS_variant_f_11 ' for bundle 'i18n/i18n.properties'" ) ;
3111
- t . is ( t . context . logVerboseSpy . getCall ( 3 ) . args [ 0 ] ,
3112
- "Skipping invalid locale 'sr_Latn_RS_variant_x_private ' for bundle 'i18n/i18n.properties'" ) ;
3113
- t . is ( t . context . logVerboseSpy . getCall ( 4 ) . args [ 0 ] ,
3114
- "Skipping invalid locale 'sr_Latn_RS_variant_f_11_x_private ' for bundle 'i18n/i18n.properties'" ) ;
3115
- t . true ( t . context . logWarnSpy . notCalled , "No warnings should be logged" ) ;
3105
+ t . is ( t . context . logWarnSpy . callCount , 5 ) ;
3106
+ t . is ( t . context . logWarnSpy . getCall ( 0 ) . args [ 0 ] ,
3107
+ "Skipping invalid file 'i18n_en -US.properties ' for bundle 'i18n/i18n.properties'" ) ;
3108
+ t . is ( t . context . logWarnSpy . getCall ( 1 ) . args [ 0 ] ,
3109
+ "Skipping invalid file 'i18n_zh_CN_.properties ' for bundle 'i18n/i18n.properties'" ) ;
3110
+ t . is ( t . context . logWarnSpy . getCall ( 2 ) . args [ 0 ] ,
3111
+ "Skipping invalid file 'i18n_sr_Latn_RS_variant_f_11.properties ' for bundle 'i18n/i18n.properties'" ) ;
3112
+ t . is ( t . context . logWarnSpy . getCall ( 3 ) . args [ 0 ] ,
3113
+ "Skipping invalid file 'i18n_sr_Latn_RS_variant_x_private.properties ' for bundle 'i18n/i18n.properties'" ) ;
3114
+ t . is ( t . context . logWarnSpy . getCall ( 4 ) . args [ 0 ] ,
3115
+ "Skipping invalid file 'i18n_sr_Latn_RS_variant_f_11_x_private.properties ' for bundle 'i18n/i18n.properties'" ) ;
3116
+ t . true ( t . context . logVerboseSpy . notCalled , "No verbose messages should be logged" ) ;
3116
3117
t . true ( t . context . logErrorSpy . notCalled , "No errors should be logged" ) ;
3117
3118
} ) ;
3118
3119
0 commit comments