Skip to content

Commit

Permalink
add populate service function to fix external variables issue
Browse files Browse the repository at this point in the history
  • Loading branch information
laardee committed Dec 21, 2016
1 parent 24bd902 commit 0fc75d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ class mochaPlugin {
})
.then((inited) => {
myModule.serverless.environment = inited.environment;

const vars = new myModule.serverless.classes.Variables(myModule.serverless);
vars.populateService();
myModule.getFunctions(funcName)
.then(utils.getTestFiles)
.then((funcs) => {
Expand All @@ -148,7 +149,6 @@ class mochaPlugin {
}
funcNames.forEach((func) => {
utils.setEnv(this.serverless, func);

const testPath = path.join(testsPath, `${func}.js`);
if (fse.existsSync(testPath)) {
testFileMap[func] = funcs[func];
Expand Down

0 comments on commit 0fc75d8

Please sign in to comment.