diff options
-rw-r--r-- | web-ui/karma.conf.js | 2 | ||||
-rw-r--r-- | web-ui/package.json | 1 | ||||
-rw-r--r-- | web-ui/test/test-main.js | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/web-ui/karma.conf.js b/web-ui/karma.conf.js index f1f590ff..e0ece693 100644 --- a/web-ui/karma.conf.js +++ b/web-ui/karma.conf.js @@ -12,7 +12,7 @@ module.exports = function (config) { basePath: '', // frameworks to use - frameworks: ['jasmine'], + frameworks: ['jasmine-ajax', 'jasmine'], // list of files / patterns to load in the browser files: [ diff --git a/web-ui/package.json b/web-ui/package.json index e1c478ee..b9c8e02c 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -14,6 +14,7 @@ "karma-chrome-launcher": "0.2.2", "karma-firefox-launcher": "0.1.7", "karma-jasmine": "0.2.2", + "karma-jasmine-ajax": "0.1.13", "karma-junit-reporter": "0.2.2", "karma-phantomjs-launcher": "1.0.0", "karma-requirejs": "1.0.0", diff --git a/web-ui/test/test-main.js b/web-ui/test/test-main.js index cc7daaee..4396993f 100644 --- a/web-ui/test/test-main.js +++ b/web-ui/test/test-main.js @@ -4,6 +4,16 @@ var tests = Object.keys(window.__karma__.files).filter(function (file) { return (/\.spec\.js$/.test(file)); }); +beforeEach(function() { + 'use strict'; + jasmine.Ajax.install(); +}); + +afterEach(function() { + 'use strict'; + jasmine.Ajax.uninstall(); +}); + requirejs.config({ baseUrl: '/base', |