Fix karma-coverage version, use gulp unit
to run unit tests
Downgrades karma-coverages, uses phantomJS to run unit test, and finally adds gulp unit as the test runner. Karma was having issues with Chrome+Browserify. Unit tests still do not run since the example services were removed. Change-Id: I8973a1e12b0b2af992bea5da552aae0736dcdf9c
This commit is contained in:
parent
865837da38
commit
942f6a9add
@ -11,8 +11,7 @@ require('./controllers/_index');
|
||||
require('./services/_index');
|
||||
require('./directives/_index');
|
||||
|
||||
// create and bootstrap application
|
||||
angular.element(document).ready(function() {
|
||||
var bootstrap = function() {
|
||||
|
||||
var requires = [
|
||||
'ui.router',
|
||||
@ -35,4 +34,9 @@ angular.element(document).ready(function() {
|
||||
|
||||
angular.bootstrap(document, ['app']);
|
||||
|
||||
});
|
||||
window.bootstrap = null;
|
||||
|
||||
};
|
||||
// create and bootstrap application
|
||||
angular.element(document).ready(bootstrap);
|
||||
window.bootstrap = bootstrap;
|
||||
|
@ -53,9 +53,8 @@
|
||||
"karma": "~0.12.0",
|
||||
"karma-babel-preprocessor": "^4.0.1",
|
||||
"karma-browserify": "^4.0.0",
|
||||
"karma-chrome-launcher": "0.1.8",
|
||||
"karma-cli": "0.0.4",
|
||||
"karma-coverage": "0.3.1",
|
||||
"karma-coverage": "0.2.6",
|
||||
"karma-jasmine": "^0.3.6",
|
||||
"karma-phantomjs-launcher": "0.2.0",
|
||||
"morgan": "^1.6.1",
|
||||
@ -71,7 +70,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "if [ ! -d .venv ]; then tox -epy27 --notest; fi",
|
||||
"test": "karma start karma.conf.js --single-run",
|
||||
"test": "gulp unit",
|
||||
"lint": "eslint --no-color stackviz/static"
|
||||
},
|
||||
"dependencies": {}
|
||||
|
@ -12,10 +12,11 @@ module.exports = function(config) {
|
||||
preprocessors: {
|
||||
'app/js/**/*.js': ['browserify', 'babel', 'coverage']
|
||||
},
|
||||
browsers: ['Chrome'],
|
||||
browsers: ['PhantomJS'],
|
||||
reporters: ['progress', 'coverage'],
|
||||
|
||||
autoWatch: true,
|
||||
singleRun: true,
|
||||
|
||||
browserify: {
|
||||
debug: true,
|
||||
@ -35,13 +36,12 @@ module.exports = function(config) {
|
||||
urlRoot: '/__karma__/',
|
||||
|
||||
files: [
|
||||
// 3rd-party resources
|
||||
'node_modules/angular/angular.min.js',
|
||||
'node_modules/angular-mocks/angular-mocks.js',
|
||||
|
||||
// app-specific code
|
||||
'app/js/main.js',
|
||||
|
||||
// 3rd-party resources
|
||||
'node_modules/angular-mocks/angular-mocks.js',
|
||||
|
||||
// test files
|
||||
'test/unit/**/*.js'
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user