Inheritance of Environment Variables in Mocha/Nodejs

I intend to store credentials to connect to web services in environment variables, since I've been creating new tests often, it's cumbersome to copy/paste variables for each Mocha Test configuration. 

I looked up Mocha settings under Defaults and copied Environment variables there expecting it to be inherited by sub tests there but not. Any suggestions? Attached picture.

 

1

Environment variables set in default Mocha run configuration should normally be inherited by all newly created Mocha run configuration. But note that changing default configuration doesn't affect existing run configurations

1

请先登录再写评论。