Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
djuretic committed Nov 1, 2013
1 parent 0ce76ee commit f4ac5df
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: node_js
node_js:
- '0.8'
- '0.10'
before_script:
- 'npm install -g bower grunt-cli'
- 'bower install'
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
4 changes: 2 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = function(config) {


// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
autoWatch: true,


// Start these browsers, currently available:
Expand All @@ -46,7 +46,7 @@ module.exports = function(config) {
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['Chrome'],
browsers: ['Firefox'],


// Continuous Integration mode
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"npm": "1.2.x"
},
"scripts": {
"test": "mocha test/api.mocha.coffee",
"test": "grunt karma",
"start": "grunt run:dev",
"postinstall": "./node_modules/bower/bin/bower install -f"
},
Expand Down
3 changes: 2 additions & 1 deletion test/spec/userServicesSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ describe('userServices', function() {

beforeEach(function(){
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);
});

Expand Down

0 comments on commit f4ac5df

Please sign in to comment.