Commit 4521175a authored by Konstantin Veretennicov's avatar Konstantin Veretennicov Committed by Addy Osmani

Fix #1616 (#1745)

* angularjs: add Jasmine as dev dependency to fix "npm test"

On a TodoMVC clone freshly configured with "npm install", the "npm test"
failed to run due to missing Karma Jasmine. This adds the necessary
dependencies, so that instructions from README.md actually work.

* angularjs: fix tests failing due to missing ngResource

* angularjs: update todoCtrl test to follow the change from 37654081
parent 779ab09b
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
}, },
"devDependencies": { "devDependencies": {
"angular-mocks": "^1.3.12", "angular-mocks": "^1.3.12",
"karma": "^0.10.0" "karma": "^0.13.0",
"karma-chrome-launcher": "^0.2.2",
"karma-firefox-launcher": "^0.1.7",
"karma-jasmine": "^0.2.2"
} }
} }
...@@ -7,6 +7,7 @@ module.exports = function (config) { ...@@ -7,6 +7,7 @@ module.exports = function (config) {
files: [ files: [
'node_modules/angular/angular.js', 'node_modules/angular/angular.js',
'node_modules/angular-route/angular-route.js', 'node_modules/angular-route/angular-route.js',
'node_modules/angular-resource/angular-resource.js',
'node_modules/angular-mocks/angular-mocks.js', 'node_modules/angular-mocks/angular-mocks.js',
'js/**/*.js', 'js/**/*.js',
'test/unit/**/*.js' 'test/unit/**/*.js'
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
scope.$emit('$routeChangeSuccess'); scope.$emit('$routeChangeSuccess');
expect(scope.status).toBe(''); expect(scope.status).toBe('');
expect(scope.statusFilter).toBeNull(); expect(scope.statusFilter).toEqual({});
}); });
describe('being at /active', function () { describe('being at /active', function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment