diff --git a/lib/plugins/aws/package/index.js b/lib/plugins/aws/package/index.js index 5ed9b0e5d..db90ed2cc 100644 --- a/lib/plugins/aws/package/index.js +++ b/lib/plugins/aws/package/index.js @@ -51,9 +51,9 @@ class AwsPackage { * Outer lifecycle hooks */ 'package:cleanup': () => - BbPromise.bind(this) - .then(() => this.serverless.pluginManager.spawn('aws:common:validate')) - .then(() => this.serverless.pluginManager.spawn('aws:common:cleanupTempDir')), + BbPromise.bind(this).then(() => + this.serverless.pluginManager.spawn('aws:common:cleanupTempDir') + ), 'package:initialize': () => BbPromise.bind(this).then(this.generateCoreTemplate), diff --git a/lib/plugins/aws/package/index.test.js b/lib/plugins/aws/package/index.test.js index fdfa003e3..ee810f5e9 100644 --- a/lib/plugins/aws/package/index.test.js +++ b/lib/plugins/aws/package/index.test.js @@ -109,16 +109,12 @@ describe('AwsPackage', () => { }); it('should run "package:cleanup" hook', () => { - const spawnAwsCommonValidateStub = spawnStub.withArgs('aws:common:validate').resolves(); const spawnAwsCommonCleanupTempDirStub = spawnStub .withArgs('aws:common:cleanupTempDir') .resolves(); return awsPackage.hooks['package:cleanup']().then(() => { - expect(spawnAwsCommonValidateStub.calledOnce).to.equal(true); - expect(spawnAwsCommonCleanupTempDirStub.calledAfter(spawnAwsCommonValidateStub)).to.equal( - true - ); + expect(spawnAwsCommonCleanupTempDirStub.calledOnce).to.equal(true); }); });