Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Run tests using test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
pontifier committed Oct 11, 2013
1 parent 5022bc2 commit fe71732
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ module.exports = function(grunt) {
cleanBowerDir: true
}
}
},
env: {
test: {
NODE_ENV: 'test'
}
}
});

Expand All @@ -81,6 +86,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-env');

//Making grunt default to force in order not to break the project.
grunt.option('force', true);
Expand All @@ -89,8 +95,8 @@ module.exports = function(grunt) {
grunt.registerTask('default', ['jshint', 'concurrent']);

//Test task.
grunt.registerTask('test', ['mochaTest']);
grunt.registerTask('test', ['env:test', 'mochaTest']);

//Bower task.
grunt.registerTask('install', ['bower']);
};
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"forever": "latest",
"grunt": "latest",
"grunt-cli": "latest",
"grunt-env": "latest",
"grunt-bower-task": "latest",
"scrypt": "latest"
},
Expand Down

0 comments on commit fe71732

Please sign in to comment.