@@ -417,33 +417,61 @@ describe('The config-generator function', () => {
417417 } ) ;
418418 } ) ;
419419
420- describe ( 'disableAssetsLoaders () removes the default assets loaders ' , ( ) => {
421- it ( 'without disableAssetsLoaders ()' , ( ) => {
420+ describe ( 'disableImagesLoader () removes the default images loader ' , ( ) => {
421+ it ( 'without disableImagesLoader ()' , ( ) => {
422422 const config = createConfig ( ) ;
423423 config . outputPath = '/tmp/output/public-path' ;
424424 config . publicPath = '/public-path' ;
425425 config . addEntry ( 'main' , './main' ) ;
426- // do not call disableAssetsLoaders
426+ // do not call disableImagesLoader
427427
428428 const actualConfig = configGenerator ( config ) ;
429429
430430 expect ( function ( ) {
431431 findRule ( / \. ( p n g | j p g | j p e g | g i f | i c o | s v g ) $ / , actualConfig . module . rules ) ;
432- findRule ( / \. ( w o f f | w o f f 2 | t t f | e o t | o t f ) $ / , actualConfig . module . rules ) ;
433432 } ) . to . not . throw ( ) ;
434433 } ) ;
435434
436- it ( 'with disableAssetsLoaders ()' , ( ) => {
435+ it ( 'with disableImagesLoader ()' , ( ) => {
437436 const config = createConfig ( ) ;
438437 config . outputPath = '/tmp/output/public-path' ;
439438 config . publicPath = '/public-path' ;
440439 config . addEntry ( 'main' , './main' ) ;
441- config . disableAssetsLoaders ( ) ;
440+ config . disableImagesLoader ( ) ;
442441
443442 const actualConfig = configGenerator ( config ) ;
444443
445444 expect ( function ( ) {
446445 findRule ( / \. ( p n g | j p g | j p e g | g i f | i c o | s v g ) $ / , actualConfig . module . rules ) ;
446+ } ) . to . throw ( ) ;
447+ } ) ;
448+ } ) ;
449+
450+ describe ( 'disableFontsLoader() removes the default fonts loader' , ( ) => {
451+ it ( 'without disableFontsLoader()' , ( ) => {
452+ const config = createConfig ( ) ;
453+ config . outputPath = '/tmp/output/public-path' ;
454+ config . publicPath = '/public-path' ;
455+ config . addEntry ( 'main' , './main' ) ;
456+ // do not call disableFontsLoader
457+
458+ const actualConfig = configGenerator ( config ) ;
459+
460+ expect ( function ( ) {
461+ findRule ( / \. ( w o f f | w o f f 2 | t t f | e o t | o t f ) $ / , actualConfig . module . rules ) ;
462+ } ) . to . not . throw ( ) ;
463+ } ) ;
464+
465+ it ( 'with disableFontsLoader()' , ( ) => {
466+ const config = createConfig ( ) ;
467+ config . outputPath = '/tmp/output/public-path' ;
468+ config . publicPath = '/public-path' ;
469+ config . addEntry ( 'main' , './main' ) ;
470+ config . disableFontsLoader ( ) ;
471+
472+ const actualConfig = configGenerator ( config ) ;
473+
474+ expect ( function ( ) {
447475 findRule ( / \. ( w o f f | w o f f 2 | t t f | e o t | o t f ) $ / , actualConfig . module . rules ) ;
448476 } ) . to . throw ( ) ;
449477 } ) ;
0 commit comments