diff --git a/lib/cleanup.js b/lib/cleanup.js index 9664c9bb5..6130f8173 100644 --- a/lib/cleanup.js +++ b/lib/cleanup.js @@ -10,6 +10,7 @@ module.exports = { const keepOutputDirectory = this.keepOutputDirectory; const cli = this.options.verbose ? this.serverless.cli : { log: _.noop }; + const keepOutputDirectory = this.keepOutputDirectory; if (!keepOutputDirectory) { cli.log(`Remove ${webpackOutputPath}`); if (this.serverless.utils.dirExistsSync(webpackOutputPath)) { diff --git a/tests/cleanup.test.js b/tests/cleanup.test.js index dec18893a..027a92d13 100644 --- a/tests/cleanup.test.js +++ b/tests/cleanup.test.js @@ -55,9 +55,7 @@ describe('cleanup', () => { module = _.assign( { serverless, - options: { - verbose: true - }, + options: {}, webpackOutputPath: 'my/Output/Path' }, baseModule diff --git a/tests/packageModules.test.js b/tests/packageModules.test.js index d9c0329f8..161580bf6 100644 --- a/tests/packageModules.test.js +++ b/tests/packageModules.test.js @@ -74,8 +74,7 @@ describe('packageModules', () => { { serverless, options: {}, - webpackOutputPath: '.webpack', - configuration: new Configuration() + webpackOutputPath: '.webpack' }, baseModule );