mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Merge pull request #1700 from djuretic/develop
Tests working (for continuous intregration)
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- '0.8'
|
|
||||||
- '0.10'
|
- '0.10'
|
||||||
before_script:
|
before_script:
|
||||||
- 'npm install -g bower grunt-cli'
|
- 'npm install -g bower grunt-cli'
|
||||||
- 'bower install'
|
- 'bower install'
|
||||||
|
- export DISPLAY=:99.0
|
||||||
|
- sh -e /etc/init.d/xvfb start
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ module.exports = function(grunt) {
|
|||||||
karma: {
|
karma: {
|
||||||
unit: {
|
unit: {
|
||||||
configFile: 'karma.conf.js'
|
configFile: 'karma.conf.js'
|
||||||
|
},
|
||||||
|
continuous: {
|
||||||
|
configFile: 'karma.conf.js',
|
||||||
|
singleRun: true,
|
||||||
|
autoWatch: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ module.exports = function(config) {
|
|||||||
|
|
||||||
|
|
||||||
// enable / disable watching file and executing tests whenever any file changes
|
// enable / disable watching file and executing tests whenever any file changes
|
||||||
autoWatch: false,
|
autoWatch: true,
|
||||||
|
|
||||||
|
|
||||||
// Start these browsers, currently available:
|
// Start these browsers, currently available:
|
||||||
@@ -46,7 +46,7 @@ module.exports = function(config) {
|
|||||||
// - Safari (only Mac)
|
// - Safari (only Mac)
|
||||||
// - PhantomJS
|
// - PhantomJS
|
||||||
// - IE (only Windows)
|
// - IE (only Windows)
|
||||||
browsers: ['Chrome'],
|
browsers: ['Firefox'],
|
||||||
|
|
||||||
|
|
||||||
// Continuous Integration mode
|
// Continuous Integration mode
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
"npm": "1.2.x"
|
"npm": "1.2.x"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha test/api.mocha.coffee",
|
"test": "grunt karma:continuous",
|
||||||
"start": "grunt run:dev",
|
"start": "grunt run:dev",
|
||||||
"postinstall": "./node_modules/bower/bin/bower install -f"
|
"postinstall": "./node_modules/bower/bin/bower install -f"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ describe('userServices', function() {
|
|||||||
|
|
||||||
beforeEach(function(){
|
beforeEach(function(){
|
||||||
module(function($provide){
|
module(function($provide){
|
||||||
$window = {href: '', alert: sinon.spy(), location: {search: '', pathname: ''}};
|
var habitrpgShared = {helpers: {newUser: sinon.spy()}};
|
||||||
|
$window = {href: '', alert: sinon.spy(), location: {search: '', pathname: ''}, habitrpgShared: habitrpgShared};
|
||||||
$provide.value('$window', $window);
|
$provide.value('$window', $window);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user