@@ -198,40 +198,6 @@ const testLocalization = (engine: TestEngineBase) => {
198198 }
199199 ) ;
200200
201- // test('Enum name should allow normal text', () => {
202- // const weekEnum = Enum(StandardWeekConfig, { name: 'Week Days' });
203- // expect(weekEnum.name).toBe('Week Days');
204- // });
205- // test('Enum name should support global localization (English)', () => {
206- // setLang('en-US');
207- // const weekEnum = Enum(StandardWeekConfig, { name: 'weekDay.name' });
208- // expect(weekEnum.name).toBe(localeEN['weekDay.name']);
209- // });
210- // test('Enum name should support global localization (Chinese)', () => {
211- // setLang('zh-CN');
212- // const weekEnum = Enum(StandardWeekConfig, { name: 'weekDay.name' });
213- // expect(weekEnum.name).toBe(localeCN['weekDay.name']);
214- // });
215- // test('Enum name should support global localization (No Locale)', () => {
216- // setLang(undefined);
217- // const weekEnum = Enum(StandardWeekConfig, { name: 'weekDay.name' });
218- // expect(weekEnum.name).toBe(noLocale['weekDay.name']);
219- // });
220- // test('Enum name should support custom localization (English)', () => {
221- // Enum.localize = undefined!;
222- // const weekEnum = Enum(StandardWeekConfig, { localize: genSillyLocalizer('en-US'), name: 'weekDay.name' });
223- // expect(weekEnum.name).toBe(localeEN['weekDay.name']);
224- // });
225- // test('Enum name should support custom localization (Chinese)', () => {
226- // Enum.localize = undefined!;
227- // const weekEnum = Enum(StandardWeekConfig, { localize: genSillyLocalizer('zh-CN'), name: 'weekDay.name' });
228- // expect(weekEnum.name).toBe(localeCN['weekDay.name']);
229- // });
230- // test('Enum name should support custom localization (No Locale)', () => {
231- // Enum.localize = undefined!;
232- // const weekEnum = Enum(StandardWeekConfig, { localize: genSillyLocalizer(undefined), name: 'weekDay.name' });
233- // expect(weekEnum.name).toBe(noLocale['weekDay.name']);
234- // });
235201 engine . test (
236202 'Enum name should allow normal text' ,
237203 ( { EnumPlus : { Enum } , WeekConfig : { StandardWeekConfig } } ) => {
@@ -279,10 +245,9 @@ const testLocalization = (engine: TestEngineBase) => {
279245 engine . test (
280246 'Enum name should support custom localization (English)' ,
281247 ( {
282- EnumPlus : { Enum, defaultLocalize, genSillyLocalizer } ,
283- WeekConfig : { StandardWeekConfig, setLang, localeEN, getLocales } ,
248+ EnumPlus : { Enum, defaultLocalize } ,
249+ WeekConfig : { StandardWeekConfig, setLang, localeEN, getLocales, genSillyLocalizer } ,
284250 } ) => {
285- setLang ( undefined , Enum , getLocales , defaultLocalize ) ;
286251 const weekEnum = Enum ( StandardWeekConfig , {
287252 localize : genSillyLocalizer ( 'en-US' , getLocales , defaultLocalize ) ,
288253 name : 'weekDay.name' ,
@@ -296,10 +261,9 @@ const testLocalization = (engine: TestEngineBase) => {
296261 engine . test (
297262 'Enum name should support custom localization (Chinese)' ,
298263 ( {
299- EnumPlus : { Enum, defaultLocalize, genSillyLocalizer } ,
300- WeekConfig : { StandardWeekConfig, setLang, localeCN, getLocales } ,
264+ EnumPlus : { Enum, defaultLocalize } ,
265+ WeekConfig : { StandardWeekConfig, setLang, localeCN, getLocales, genSillyLocalizer } ,
301266 } ) => {
302- setLang ( undefined , Enum , getLocales , defaultLocalize ) ;
303267 const weekEnum = Enum ( StandardWeekConfig , {
304268 localize : genSillyLocalizer ( 'zh-CN' , getLocales , defaultLocalize ) ,
305269 name : 'weekDay.name' ,
@@ -313,10 +277,9 @@ const testLocalization = (engine: TestEngineBase) => {
313277 engine . test (
314278 'Enum name should support custom localization (No Locale)' ,
315279 ( {
316- EnumPlus : { Enum, defaultLocalize, genSillyLocalizer } ,
317- WeekConfig : { StandardWeekConfig, setLang, noLocale, getLocales } ,
280+ EnumPlus : { Enum, defaultLocalize } ,
281+ WeekConfig : { StandardWeekConfig, setLang, noLocale, getLocales, genSillyLocalizer } ,
318282 } ) => {
319- setLang ( undefined , Enum , getLocales , defaultLocalize ) ;
320283 const weekEnum = Enum ( StandardWeekConfig , {
321284 localize : genSillyLocalizer ( undefined , getLocales , defaultLocalize ) ,
322285 name : 'weekDay.name' ,
0 commit comments