Skip to content

'development' configuration is loaded when run tests #179

@gyuwon

Description

@gyuwon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions