mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-02 17:03:42 -04:00
Merge pull request #3010 from trotod/update-tests
Fixes #2913 Fixes #2980
This commit is contained in:
commit
dfcdfd92b1
4 changed files with 21 additions and 9 deletions
25
.travis.yml
25
.travis.yml
|
@ -1,26 +1,35 @@
|
||||||
|
sudo: false
|
||||||
|
|
||||||
language: node_js
|
language: node_js
|
||||||
|
|
||||||
node_js:
|
node_js:
|
||||||
- 0.10
|
- 0.10
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- mongodb-upstart
|
||||||
|
packages:
|
||||||
|
- mongodb-org-server
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- node_modules
|
||||||
|
- bower_components
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10"
|
- npm install -g npm@latest
|
||||||
- "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list"
|
|
||||||
- "sudo apt-get update"
|
|
||||||
- "sudo apt-get install mongodb-org-server"
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- "npm install"
|
|
||||||
- export DISPLAY=:99.0
|
- export DISPLAY=:99.0
|
||||||
- export COCO_TRAVIS_TEST=1
|
- export COCO_TRAVIS_TEST=1
|
||||||
- sh -e /etc/init.d/xvfb start
|
- sh -e /etc/init.d/xvfb start
|
||||||
- "./node_modules/.bin/bower install"
|
- "./node_modules/.bin/bower install"
|
||||||
- "gem install sass"
|
- "gem install sass"
|
||||||
- "./node_modules/.bin/brunch b"
|
- "./node_modules/.bin/brunch b"
|
||||||
- "mkdir mongo"
|
|
||||||
- "mongod --dbpath=./mongo --fork --logpath ./mongodb.log"
|
|
||||||
- "node index.js --unittest &"
|
- "node index.js --unittest &"
|
||||||
- "sleep 10" # to give node a chance to start
|
- "sleep 10" # to give node a chance to start
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- "./node_modules/jasmine-node/bin/jasmine-node test/server/ --coffee --captureExceptions"
|
- "./node_modules/jasmine-node/bin/jasmine-node test/server/ --coffee --captureExceptions"
|
||||||
# - "./node_modules/karma/bin/karma start --browsers Firefox --single-run --reporters progress"
|
- "./node_modules/karma/bin/karma start --browsers Firefox --single-run --reporters progress"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
|
|
||||||
window.userObject = {_id:'1'}
|
window.userObject = {_id:'1'}
|
||||||
|
window.StripeCheckout = {configure: function (){}}
|
||||||
initialize = require('core/initialize');
|
initialize = require('core/initialize');
|
||||||
initialize.init();
|
initialize.init();
|
||||||
console.debug = function() {}; // Karma conf doesn't seem to work? Debug messages are still emitted when they shouldn't be.
|
console.debug = function() {}; // Karma conf doesn't seem to work? Debug messages are still emitted when they shouldn't be.
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
"karma": "~0.12",
|
"karma": "~0.12",
|
||||||
"karma-chrome-launcher": "~0.1.2",
|
"karma-chrome-launcher": "~0.1.2",
|
||||||
"karma-coffee-preprocessor": "~0.1.2",
|
"karma-coffee-preprocessor": "~0.1.2",
|
||||||
"karma-coverage": "~0.1.4",
|
"karma-coverage": "~0.5.1",
|
||||||
"karma-firefox-launcher": "~0.1.3",
|
"karma-firefox-launcher": "~0.1.3",
|
||||||
"karma-html2js-preprocessor": "~0.1.0",
|
"karma-html2js-preprocessor": "~0.1.0",
|
||||||
"karma-jasmine": "~0.2.0",
|
"karma-jasmine": "~0.2.0",
|
||||||
|
|
|
@ -94,6 +94,7 @@ describe 'LevelLoader', ->
|
||||||
describe 'loadDependenciesForSession', ->
|
describe 'loadDependenciesForSession', ->
|
||||||
it 'loads hero and item thang types from heroConfig in the given session', ->
|
it 'loads hero and item thang types from heroConfig in the given session', ->
|
||||||
levelLoader = new LevelLoader({supermodel:new SuperModel(), sessionID: 'id', levelID: 'id'})
|
levelLoader = new LevelLoader({supermodel:new SuperModel(), sessionID: 'id', levelID: 'id'})
|
||||||
|
levelLoader.sessionDependenciesRegistered = {}
|
||||||
session = new LevelSession(sessionWithAnyaWithGloves)
|
session = new LevelSession(sessionWithAnyaWithGloves)
|
||||||
levelLoader.loadDependenciesForSession(session)
|
levelLoader.loadDependenciesForSession(session)
|
||||||
requests = jasmine.Ajax.requests.all()
|
requests = jasmine.Ajax.requests.all()
|
||||||
|
@ -103,6 +104,7 @@ describe 'LevelLoader', ->
|
||||||
|
|
||||||
it 'loads components for the hero in the heroConfig in the given session', ->
|
it 'loads components for the hero in the heroConfig in the given session', ->
|
||||||
levelLoader = new LevelLoader({supermodel:new SuperModel(), sessionID: 'id', levelID: 'id'})
|
levelLoader = new LevelLoader({supermodel:new SuperModel(), sessionID: 'id', levelID: 'id'})
|
||||||
|
levelLoader.sessionDependenciesRegistered = {}
|
||||||
session = new LevelSession(sessionWithAnyaWithGloves)
|
session = new LevelSession(sessionWithAnyaWithGloves)
|
||||||
levelLoader.loadDependenciesForSession(session)
|
levelLoader.loadDependenciesForSession(session)
|
||||||
responses = {
|
responses = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue