Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass envs to application #12

Closed
refextu opened this issue Sep 30, 2015 · 1 comment
Closed

pass envs to application #12

refextu opened this issue Sep 30, 2015 · 1 comment

Comments

@refextu
Copy link

refextu commented Sep 30, 2015

the following documentation is missleading, but obvious passing envs to the app ist not possible, when the app is already initialized.

var Session = require('supertest-session')({
  app: require('../../path/to/app'),
  envs: { NODE_ENV: 'development' }
});

what you have to do work with envs consistently:

process.env['NODE_ENV'] = "development";
var Session = require('supertest-session')({
  app: require('../../path/to/app'),
}); 

I would suggest to depreciate the use of your envs, cause the status of envs changes over runtime.

@rjz
Copy link
Owner

rjz commented Oct 1, 2015

Absolutely! If you're willing to submit a PR to this effect, it should be a pretty uncontroversial merge.

@rjz rjz mentioned this issue Oct 3, 2015
@rjz rjz closed this as completed in 5b39134 Oct 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants