mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Fix karma tests
* "Shim" StripeCheckout * Fix loadDependenciesForSession test * Update karma coverage for better perf
This commit is contained in:
parent
25c693eed4
commit
3266bd4621
3 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
|
||||
window.userObject = {_id:'1'}
|
||||
window.StripeCheckout = {configure: function (){}}
|
||||
initialize = require('core/initialize');
|
||||
initialize.init();
|
||||
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-chrome-launcher": "~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-html2js-preprocessor": "~0.1.0",
|
||||
"karma-jasmine": "~0.2.0",
|
||||
|
|
|
@ -94,6 +94,7 @@ describe 'LevelLoader', ->
|
|||
describe 'loadDependenciesForSession', ->
|
||||
it 'loads hero and item thang types from heroConfig in the given session', ->
|
||||
levelLoader = new LevelLoader({supermodel:new SuperModel(), sessionID: 'id', levelID: 'id'})
|
||||
levelLoader.sessionDependenciesRegistered = {}
|
||||
session = new LevelSession(sessionWithAnyaWithGloves)
|
||||
levelLoader.loadDependenciesForSession(session)
|
||||
requests = jasmine.Ajax.requests.all()
|
||||
|
@ -103,6 +104,7 @@ describe 'LevelLoader', ->
|
|||
|
||||
it 'loads components for the hero in the heroConfig in the given session', ->
|
||||
levelLoader = new LevelLoader({supermodel:new SuperModel(), sessionID: 'id', levelID: 'id'})
|
||||
levelLoader.sessionDependenciesRegistered = {}
|
||||
session = new LevelSession(sessionWithAnyaWithGloves)
|
||||
levelLoader.loadDependenciesForSession(session)
|
||||
responses = {
|
||||
|
|
Loading…
Reference in a new issue