gioboa / jira-plugin

Jira plugin for VsCode
https://marketplace.visualstudio.com/items?itemName=gioboa.jira-plugin
MIT License
266 stars 41 forks source link

refactoring: Separate test environment from production #77

Closed knicefire closed 5 years ago

knicefire commented 5 years ago

While under development, running tests messes up with production configuration and replaces it with mocked data

Detect scenario when the code is ran under the test, to prevent messing up with "production" settings

gioboa commented 5 years ago

I use VsCode insiders so I didn't know about this problem. It's an important issue to solve.

UPDATE

I tried to assign another CONFIG_NAME in test execution but vscode complain because no setting is registered with the new value. e.g jira-plugin-test.baseUrl

knicefire commented 5 years ago

Can you reproduce it with regular VsCode? Probably it messes up settings just in my case

gioboa commented 5 years ago

With normal VsCode I have exactly the problem that you described :+1:

gioboa commented 5 years ago

The plugin will backup settings before execute tests and it will restore settings after tests. 👍