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

NODE_ENV is no longer defaulting to 'test' #606

Closed
nlf opened this issue Jun 14, 2016 · 6 comments
Labels
bug
Milestone

Comments

@nlf
Copy link
Member

@nlf nlf commented Jun 14, 2016

this commit removed the default for the environment setting erroneously causing NODE_ENV to be set to undefined if none is passed

@nlf nlf added the bug label Jun 14, 2016
@nlf

This comment has been minimized.

Copy link
Member Author

@nlf nlf commented Jun 14, 2016

the bigger concern here is that there's a test to verify the default that's passing despite this

@geek

This comment has been minimized.

Copy link
Member

@geek geek commented Jun 14, 2016

@nlf the test is correct, there is a default environment value set in the runner. It looks like issue is in the merging of the cli config and these runner defaults.

@nlf

This comment has been minimized.

Copy link
Member Author

@nlf nlf commented Jun 14, 2016

ah ok, that makes more sense

@geek

This comment has been minimized.

Copy link
Member

@geek geek commented Jun 14, 2016

@nlf I actually can't reproduce. Can you provide more information: the node version and if you have a .labrc.js set? I tried with hapi and it shows that the NODE_ENV is set to "test" when I run using the latest version of lab.

@nlf

This comment has been minimized.

Copy link
Member Author

@nlf nlf commented Jun 14, 2016

using latest lab, node 6.2.1, no .labrc.js exists

if you create an empty directory, install lab, and insert the boilerplate below as test/index.js it reproduces it for me

'use strict';

const lab = exports.lab = require('lab').script();
console.log(process.env.NODE_ENV);
Marsup added a commit that referenced this issue Jun 14, 2016
@geek geek closed this in 2f40e25 Jun 14, 2016
@geek geek modified the milestones: 10.8.3, 10.8.2 Jun 14, 2016
@geek

This comment has been minimized.

Copy link
Member

@geek geek commented Jun 14, 2016

@nlf this is now published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.