forked from angular/material-start
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update(build): fix karma and npm packages
* update package.json * remove use of `bower`; only use npm * add karma unit tests, fix karma.conf.js * remove protractor configuration; disabled for now. Fixes angular#55. Fixes angular#51. Fixes angular#44. Fixes angular#23.
- Loading branch information
1 parent
636836d
commit 441dbc9
Showing
14 changed files
with
119 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
{ | ||
"name": "material-start", | ||
"private": true, | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A starter project for AngularJS Material", | ||
"repository": "https://github.com/angular/material-start", | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/angular/material/blob/master/LICENSE" | ||
} | ||
], | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/angular/material/blob/master/LICENSE" | ||
} | ||
], | ||
"dependencies": { | ||
"angular": "^1.4.9", | ||
"angular-animate": "^1.4.9", | ||
"angular-aria": "^1.4.9", | ||
"angular-material": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"karma": "~0.10", | ||
"protractor": "^2.0.0", | ||
"http-server": "^0.6.1", | ||
"bower": "^1.3.1", | ||
"shelljs": "^0.2.6", | ||
"karma-junit-reporter": "^0.2.2", | ||
"selenium-webdriver": "^2.45.1" | ||
"angular-mocks": "^1.4.9", | ||
"karma": "^0.13.19", | ||
"karma-chrome-launcher": "^0.2.2", | ||
"karma-jasmine": "^0.3.6", | ||
"live-server": "^0.9.1" | ||
}, | ||
"scripts": { | ||
"postinstall": "bower update", | ||
"prestart": "npm update", | ||
"test": "protractor ./e2e/protractor.conf.js" | ||
"tests": "karma start ./test/karma.conf.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module.exports = function (config) { | ||
config.set({ | ||
|
||
basePath: '../', | ||
|
||
files: [ | ||
'node_modules/angular/angular.js', | ||
'node_modules/angular-animate/angular-animate.js', | ||
'node_modules/angular-aria/angular-aria.js', | ||
'node_modules/angular-mocks/angular-mocks.js', | ||
'node_modules/angular-material/angular-material.js', | ||
|
||
'app/src/users/Users.js', | ||
'app/src/users/UserService.js', | ||
'app/src/users/UserController.js', | ||
|
||
'test/unit/**/*.js' | ||
], | ||
|
||
logLevel: config.LOG_ERROR, | ||
port: 9876, | ||
reporters: ['progress'], | ||
colors: true, | ||
|
||
autoWatch : false, | ||
singleRun : true, | ||
|
||
// For TDD mode | ||
//autoWatch : true, | ||
//singleRun : false, | ||
|
||
frameworks: ['jasmine'], | ||
browsers: ['Chrome'], | ||
|
||
plugins: [ | ||
'karma-chrome-launcher', | ||
'karma-jasmine' | ||
] | ||
|
||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
describe('UserService', function () { | ||
|
||
beforeEach(module('users')); | ||
|
||
it('should provide a valid user list', inject(function (userService, $timeout) { | ||
var list= []; | ||
|
||
userService | ||
.loadAllUsers() | ||
.then(function(knownUsers){ | ||
list = knownUsers; | ||
}); | ||
$timeout.flush(); | ||
|
||
expect(list.length).toBe(6); | ||
})); | ||
|
||
}); |