@@ -15,7 +15,6 @@ const RuntimeConfig = require('../lib/config/RuntimeConfig');
15
15
const configGenerator = require ( '../lib/config-generator' ) ;
16
16
const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
17
17
const { WebpackManifestPlugin } = require ( '../lib/webpack-manifest-plugin' ) ;
18
- const { CleanWebpackPlugin } = require ( 'clean-webpack-plugin' ) ;
19
18
const webpack = require ( 'webpack' ) ;
20
19
const path = require ( 'path' ) ;
21
20
const logger = require ( '../lib/logger' ) ;
@@ -534,7 +533,7 @@ describe('The config-generator function', () => {
534
533
} ) ;
535
534
} ) ;
536
535
537
- describe ( 'cleanupOutputBeforeBuild() adds CleanWebpackPlugin ' , ( ) => {
536
+ describe ( 'cleanupOutputBeforeBuild() configures output cleaning ' , ( ) => {
538
537
it ( 'without cleanupOutputBeforeBuild()' , ( ) => {
539
538
const config = createConfig ( ) ;
540
539
config . outputPath = '/tmp/output/public-path' ;
@@ -543,8 +542,7 @@ describe('The config-generator function', () => {
543
542
544
543
const actualConfig = configGenerator ( config ) ;
545
544
546
- const cleanPlugin = findPlugin ( CleanWebpackPlugin , actualConfig . plugins ) ;
547
- expect ( cleanPlugin ) . to . be . undefined ;
545
+ expect ( actualConfig . output . clean ) . to . be . false ;
548
546
} ) ;
549
547
550
548
it ( 'with cleanupOutputBeforeBuild()' , ( ) => {
@@ -556,8 +554,7 @@ describe('The config-generator function', () => {
556
554
557
555
const actualConfig = configGenerator ( config ) ;
558
556
559
- const cleanPlugin = findPlugin ( CleanWebpackPlugin , actualConfig . plugins ) ;
560
- expect ( cleanPlugin ) . to . not . be . undefined ;
557
+ expect ( actualConfig . output . clean ) . to . deep . equals ( { } ) ;
561
558
} ) ;
562
559
} ) ;
563
560
0 commit comments