From c4f7fb6b0aa36acf53e2c3a5a2567c7746ff00a3 Mon Sep 17 00:00:00 2001 From: ac360 Date: Fri, 5 Feb 2016 00:36:15 -0800 Subject: [PATCH] ComponentCreate: add sPath to evt.data --- lib/actions/ComponentCreate.js | 1 + tests/tests/actions/ComponentCreate.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/actions/ComponentCreate.js b/lib/actions/ComponentCreate.js index 98656e3ff..5a7fc19c6 100644 --- a/lib/actions/ComponentCreate.js +++ b/lib/actions/ComponentCreate.js @@ -169,6 +169,7 @@ usage: serverless component create`, sPath: this.evt.options.name }); this.S.state.setAsset(component); + this.evt.data.sPath = component._config.sPath; return component.save(); }; diff --git a/tests/tests/actions/ComponentCreate.js b/tests/tests/actions/ComponentCreate.js index 5dcf501c9..f378bcd91 100644 --- a/tests/tests/actions/ComponentCreate.js +++ b/tests/tests/actions/ComponentCreate.js @@ -23,6 +23,7 @@ let serverless; let validateEvent = function(evt) { assert.equal(true, typeof evt.options.name != 'undefined'); assert.equal(true, typeof evt.options.runtime != 'undefined'); + assert.equal(true, typeof evt.data.sPath != 'undefined'); }; describe('Test action: Component Create', function() {