@@ -308,7 +308,6 @@ describe('parser', () => {
308308 const i18nextParser = new i18nTransform ( {
309309 locales : [ 'en' ] ,
310310 defaultNamespace : 'default' ,
311- ignoreEmptyKeys : true ,
312311 } )
313312 const fakeFile = new Vinyl ( {
314313 contents : Buffer . from ( "t('empty:');" ) ,
@@ -341,7 +340,6 @@ describe('parser', () => {
341340 const i18nextParser = new i18nTransform ( {
342341 locales : [ 'en' ] ,
343342 defaultNamespace : 'test_empty' ,
344- ignoreEmptyKeys : true ,
345343 } )
346344 const fakeFile = new Vinyl ( {
347345 contents : Buffer . from ( "t('key'); t('');" ) ,
@@ -361,7 +359,7 @@ describe('parser', () => {
361359 i18nextParser . end ( fakeFile )
362360 } )
363361
364- it ( 'includes empty keys by default' , ( done ) => {
362+ it ( 'ignores empty keys by default' , ( done ) => {
365363 let resultContent
366364 const i18nextParser = new i18nTransform ( {
367365 locales : [ 'en' ] ,
@@ -378,19 +376,19 @@ describe('parser', () => {
378376 }
379377 } )
380378 i18nextParser . on ( 'end' , ( ) => {
381- assert . deepEqual ( resultContent , { key : '' , '' : '' } )
379+ assert . deepEqual ( resultContent , { key : '' } )
382380 done ( )
383381 } )
384382
385383 i18nextParser . end ( fakeFile )
386384 } )
387385
388- it ( 'ignores empty keys when scanning source files when ignoreEmptyKeys is true ' , ( done ) => {
386+ it ( 'includes empty keys when ignoreEmptyKeys is false ' , ( done ) => {
389387 let resultContent
390388 const i18nextParser = new i18nTransform ( {
391389 locales : [ 'en' ] ,
392390 defaultNamespace : 'test_ignore_empty' ,
393- ignoreEmptyKeys : true ,
391+ ignoreEmptyKeys : false ,
394392 } )
395393 const fakeFile = new Vinyl ( {
396394 contents : Buffer . from ( "t('key'); t('');" ) ,
@@ -403,7 +401,7 @@ describe('parser', () => {
403401 }
404402 } )
405403 i18nextParser . on ( 'end' , ( ) => {
406- assert . deepEqual ( resultContent , { key : '' } )
404+ assert . deepEqual ( resultContent , { key : '' , '' : '' } )
407405 done ( )
408406 } )
409407
0 commit comments