Skip to content

'development' configuration is loaded when run tests #179

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

Closed
gyuwon opened this issue Apr 15, 2014 · 2 comments
Closed

'development' configuration is loaded when run tests #179

gyuwon opened this issue Apr 15, 2014 · 2 comments

Comments

@gyuwon
Copy link

gyuwon commented Apr 15, 2014

I faced the situation that the 'development' configuration is loaded rather than 'test' when run tests.

$ grunt test

I found the cause is in Gruntfile.js

process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var config = require('./lib/config/config');

Because this code(from fix(gruntfile): update gruntfile to use port from config #121), the configuration is loaded before NODE_ENV is set to 'test'

This problem is critical to model tests and other unit tests not using a repository test double.

@fiznool
Copy link

fiznool commented Apr 15, 2014

+1

@gyuwon
Copy link
Author

gyuwon commented Apr 16, 2014

@DaftMonk Good, Thank you!

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