Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Dynamic custom config generation bug #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Dynamic custom config generation bug #82

wants to merge 1 commit into from

Conversation

zavale
Copy link

@zavale zavale commented Apr 19, 2018

In a case, that documentation variable added dynamically to custom, by generate.js script, this.customVars remains uninitialized, since generate.js runs after the plugin constructed. That causes an immediate return at if (!(this.customVars && this.customVars.documentation)) return; check.

Reinitializing this.customVarsin beforeDeploy() solves the problem

However, it will require modification in the test

    it('shouldn\'t do anything if there are no custom variables', function () {
      delete this.plugin.customVars;
      this.plugin.beforeDeploy();
      expect(this.serverlessMock.service.getAllFunctions).not.toHaveBeenCalled();
    });

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant