diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-23 12:50:15 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-23 12:50:15 +0100 |
commit | f88f8fcb7f7451babc8aa20ecc0dad06dd27e1ed (patch) | |
tree | cb53495565d3a5757b6efc44c179b6d95b244721 | |
parent | 367a4eed30e9fa77a2aa5d7924f041e967f8567d (diff) |
update jasmine, karma and angular
74 files changed, 1544 insertions, 1351 deletions
diff --git a/js/package.json b/js/package.json index 9627dc96b..a9b593510 100644 --- a/js/package.json +++ b/js/package.json @@ -31,18 +31,18 @@ "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-uglify": "^0.6.0", "grunt-contrib-watch": "^0.6.1", - "grunt-ng-annotate": "^0.6.0", + "grunt-ng-annotate": "^0.8.0", "grunt-php": "^1.1.1", "grunt-phpunit": "^0.3.6", "grunt-protractor-runner": "^1.1.4", - "grunt-protractor-webdriver": "^0.1.9", + "grunt-protractor-webdriver": "^0.2.0", "grunt-wrap": "^0.3.0", "grunt-karma": "^0.9.0", - "karma": "^0.12.25", - "karma-chrome-launcher": "^0.1.5", - "karma-coverage": "^0.2.6", + "karma": "^0.12.28", + "karma-chrome-launcher": "^0.1.7", + "karma-coverage": "^0.2.7", "karma-firefox-launcher": "^0.1.3", - "karma-jasmine": "^0.1.5" + "karma-jasmine": "^0.3.2" }, "dependencies": {} } diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index 25314e561..decdceeab 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -108,8 +108,8 @@ describe('ContentController', function () { expect(ItemResource.markItemRead).toHaveBeenCalledWith(3); expect(FeedResource.markItemOfFeedRead).toHaveBeenCalledWith(4); - expect(ItemResource.markItemRead.callCount).toBe(1); - expect(FeedResource.markItemOfFeedRead.callCount).toBe(1); + expect(ItemResource.markItemRead.calls.count()).toBe(1); + expect(FeedResource.markItemOfFeedRead.calls.count()).toBe(1); })); @@ -302,7 +302,7 @@ describe('ContentController', function () { Publisher.subscribe(ItemResource).toChannels(['items']); ItemResource.autoPage = jasmine.createSpy('autoPage') - .andCallFake(function () { + .and.callFake(function () { return { success: function (callback) { callback({ @@ -360,7 +360,7 @@ describe('ContentController', function () { Publisher.subscribe(ItemResource).toChannels(['items']); ItemResource.autoPage = jasmine.createSpy('autoPage') - .andCallFake(function () { + .and.callFake(function () { return { success: function (callback) { callback({ @@ -412,7 +412,7 @@ describe('ContentController', function () { Publisher.subscribe(ItemResource).toChannels(['items']); ItemResource.autoPage = jasmine.createSpy('autoPage') - .andCallFake(function () { + .and.callFake(function () { return { success: function (callback) { callback({ diff --git a/js/tests/unit/controller/NavigationControllerSpec.js b/js/tests/unit/controller/NavigationControllerSpec.js index 72b9fe736..994414307 100644 --- a/js/tests/unit/controller/NavigationControllerSpec.js +++ b/js/tests/unit/controller/NavigationControllerSpec.js @@ -70,7 +70,7 @@ describe('NavigationController', function () { controller.markFolderRead(3); expect(FeedResource.markFolderRead).toHaveBeenCalledWith(3); - expect(ItemResource.markFeedRead.callCount).toBe(2); + expect(ItemResource.markFeedRead.calls.count()).toBe(2); })); @@ -317,7 +317,7 @@ describe('NavigationController', function () { it('should create a feed with a folderId', inject(function ($controller) { var FeedResource = { - create: jasmine.createSpy('create').andCallFake( + create: jasmine.createSpy('create').and.callFake( function (url, folderId) { return { then: function (callback) { @@ -378,7 +378,7 @@ describe('NavigationController', function () { it('should create a feed with a foldername', inject(function ($controller) { var FeedResource = { - create: jasmine.createSpy('create').andCallFake( + create: jasmine.createSpy('create').and.callFake( function (url, folderId) { return { then: function (callback) { @@ -398,7 +398,7 @@ describe('NavigationController', function () { }; var FolderResource = { - create: jasmine.createSpy('create').andCallFake(function (folder) { + create: jasmine.createSpy('create').and.callFake(function (folder) { return { then: function (callback) { callback({ @@ -410,7 +410,7 @@ describe('NavigationController', function () { } }; }), - get: jasmine.createSpy('get').andCallFake(function (name) { + get: jasmine.createSpy('get').and.callFake(function (name) { return { name: name, id: 19 @@ -459,7 +459,7 @@ describe('NavigationController', function () { it('should create a folder', inject(function ($controller) { var FolderResource = { - create: jasmine.createSpy('create').andCallFake( + create: jasmine.createSpy('create').and.callFake( function (folder) { return { then: function (callback) { @@ -633,7 +633,7 @@ describe('NavigationController', function () { it('should rename a folder', inject(function ($controller, FolderResource) { FolderResource.rename = jasmine.createSpy('rename') - .andCallFake(function () { + .and.callFake(function () { return { then: function (success) { success(); @@ -668,7 +668,7 @@ describe('NavigationController', function () { it('should handle rename folder error', inject(function ($controller, FolderResource) { FolderResource.rename = jasmine.createSpy('rename') - .andCallFake(function () { + .and.callFake(function () { return { then: function (success, error) { error('no'); @@ -728,7 +728,7 @@ describe('NavigationController', function () { $controller, FeedResource, $q, $rootScope) { var deferred = $q.defer(); FeedResource.reversiblyDelete = jasmine.createSpy('reversiblyDelete') - .andReturn(deferred.promise); + .and.returnValue(deferred.promise); var route = { reload: jasmine.createSpy('reload') }; @@ -759,7 +759,7 @@ describe('NavigationController', function () { $controller, FeedResource, $q, $rootScope) { var deferred = $q.defer(); FeedResource.undoDelete = jasmine.createSpy('undoDelete') - .andReturn(deferred.promise); + .and.returnValue(deferred.promise); var route = { reload: jasmine.createSpy('reload') }; @@ -810,10 +810,10 @@ describe('NavigationController', function () { var deferredFolder = $q.defer(); |