Refresh js test environment

Before add CI jobs for JS tests, refresh test settings.

Change-Id: Ic7d9314cf2381609fb584f8c97ddb201918e3061
This commit is contained in:
Shu Muto 2017-03-10 19:11:36 +09:00
parent b359e776c1
commit 14f4bc1df1
3 changed files with 27 additions and 19 deletions

View File

@ -32,14 +32,19 @@ rules:
requireParamDescription: false
}]
brace-style: 1
no-extra-parens: 1
consistent-return: 1
callback-return: 1
guard-for-in: 1
block-scoped-var: 1
semi-spacing: 1
no-redeclare: 1
callback-return: 1
consistent-return: 1
guard-for-in: 1
no-extra-parens: 1
no-new: 1
no-redeclare: 1
no-undefined: 1
no-unneeded-ternary: 1
no-use-before-define: 1
quote-props: 0
semi-spacing: 1
space-in-parens: 1
#############################################################################
# Angular Plugin Customization

View File

@ -6,8 +6,8 @@
"repository": "none",
"license": "Apache 2.0",
"devDependencies": {
"eslint": "1.10.3",
"eslint-config-openstack": "1.2.4",
"eslint": "^1.10.3",
"eslint-config-openstack": "^1.2.4",
"eslint-plugin-angular": "1.0.1",
"jasmine-core": "2.4.1",
"karma": "1.1.2",
@ -16,10 +16,12 @@
"karma-coverage": "1.1.1",
"karma-jasmine": "1.0.2",
"karma-ng-html2js-preprocessor": "1.0.0",
"karma-threshold-reporter": "0.1.15"
"karma-phantomjs-launcher": "0.2.0",
"karma-threshold-reporter": "0.1.15",
"phantomjs": "1.9.17"
},
"scripts": {
"postinstall": "if [ ! -d .venv ]; then tox -epy27 --notest; fi",
"postinstall": "if [ ! -d .tox ] || [ ! -d .tox/py27 ]; then tox -epy27 --notest; fi",
"test": "karma start zun_ui/karma.conf.js --single-run",
"lint": "eslint --no-color zun_ui/static",
"lintq": "eslint --quiet zun_ui/static"

View File

@ -55,7 +55,6 @@ module.exports = function (config) {
toxPath + 'xstatic/pkg/angular/data/angular-cookies.js',
toxPath + 'xstatic/pkg/angular_bootstrap/data/angular-bootstrap.js',
toxPath + 'xstatic/pkg/angular_gettext/data/angular-gettext.js',
toxPath + 'xstatic/pkg/angular_fileupload/data/ng-file-upload-all.js',
toxPath + 'xstatic/pkg/angular/data/angular-sanitize.js',
toxPath + 'xstatic/pkg/d3/data/d3.js',
toxPath + 'xstatic/pkg/rickshaw/data/rickshaw.js',
@ -102,7 +101,6 @@ module.exports = function (config) {
* among them should not be significant.
*/
toxPath + 'openstack_dashboard/static/**/*.mock.js',
//'./static/**/*.mock.js',
/**
* Finally, list files for spec with `spec.js` extension. The order
@ -120,7 +118,9 @@ module.exports = function (config) {
frameworks: ['jasmine'],
browsers: ['Chrome'],
browsers: ['PhantomJS'],
browserNoActivityTimeout: 60000,
phantomjsLauncher: {
// Have phantomjs exit if a ResourceError is encountered
@ -131,24 +131,25 @@ module.exports = function (config) {
reporters: ['progress', 'coverage', 'threshold'],
plugins: [
'karma-chrome-launcher',
'karma-phantomjs-launcher',
'karma-jasmine',
'karma-ng-html2js-preprocessor',
'karma-coverage',
'karma-threshold-reporter'
],
// Places coverage report in HTML format in the subdirectory below.
coverageReporter: {
type: 'html',
dir: '../cover/zun_ui'
dir: '../cover/karma/'
},
// Coverage threshold values.
thresholdReporter: {
statements: 45,
branches: 0,
functions: 15,
lines: 45
statements: 10, // target 100
branches: 0, // target 100
functions: 10, // target 100
lines: 10 // target 100
}
});
};