Refresh js test environment
Before add CI jobs for JS tests, refresh test settings. Change-Id: Ic7d9314cf2381609fb584f8c97ddb201918e3061
This commit is contained in:
parent
b359e776c1
commit
14f4bc1df1
17
.eslintrc
17
.eslintrc
@ -32,14 +32,19 @@ rules:
|
|||||||
requireParamDescription: false
|
requireParamDescription: false
|
||||||
}]
|
}]
|
||||||
brace-style: 1
|
brace-style: 1
|
||||||
no-extra-parens: 1
|
|
||||||
consistent-return: 1
|
|
||||||
callback-return: 1
|
|
||||||
guard-for-in: 1
|
|
||||||
block-scoped-var: 1
|
block-scoped-var: 1
|
||||||
semi-spacing: 1
|
callback-return: 1
|
||||||
no-redeclare: 1
|
consistent-return: 1
|
||||||
|
guard-for-in: 1
|
||||||
|
no-extra-parens: 1
|
||||||
no-new: 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
|
# Angular Plugin Customization
|
||||||
|
10
package.json
10
package.json
@ -6,8 +6,8 @@
|
|||||||
"repository": "none",
|
"repository": "none",
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "1.10.3",
|
"eslint": "^1.10.3",
|
||||||
"eslint-config-openstack": "1.2.4",
|
"eslint-config-openstack": "^1.2.4",
|
||||||
"eslint-plugin-angular": "1.0.1",
|
"eslint-plugin-angular": "1.0.1",
|
||||||
"jasmine-core": "2.4.1",
|
"jasmine-core": "2.4.1",
|
||||||
"karma": "1.1.2",
|
"karma": "1.1.2",
|
||||||
@ -16,10 +16,12 @@
|
|||||||
"karma-coverage": "1.1.1",
|
"karma-coverage": "1.1.1",
|
||||||
"karma-jasmine": "1.0.2",
|
"karma-jasmine": "1.0.2",
|
||||||
"karma-ng-html2js-preprocessor": "1.0.0",
|
"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": {
|
"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",
|
"test": "karma start zun_ui/karma.conf.js --single-run",
|
||||||
"lint": "eslint --no-color zun_ui/static",
|
"lint": "eslint --no-color zun_ui/static",
|
||||||
"lintq": "eslint --quiet zun_ui/static"
|
"lintq": "eslint --quiet zun_ui/static"
|
||||||
|
@ -55,7 +55,6 @@ module.exports = function (config) {
|
|||||||
toxPath + 'xstatic/pkg/angular/data/angular-cookies.js',
|
toxPath + 'xstatic/pkg/angular/data/angular-cookies.js',
|
||||||
toxPath + 'xstatic/pkg/angular_bootstrap/data/angular-bootstrap.js',
|
toxPath + 'xstatic/pkg/angular_bootstrap/data/angular-bootstrap.js',
|
||||||
toxPath + 'xstatic/pkg/angular_gettext/data/angular-gettext.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/angular/data/angular-sanitize.js',
|
||||||
toxPath + 'xstatic/pkg/d3/data/d3.js',
|
toxPath + 'xstatic/pkg/d3/data/d3.js',
|
||||||
toxPath + 'xstatic/pkg/rickshaw/data/rickshaw.js',
|
toxPath + 'xstatic/pkg/rickshaw/data/rickshaw.js',
|
||||||
@ -102,7 +101,6 @@ module.exports = function (config) {
|
|||||||
* among them should not be significant.
|
* among them should not be significant.
|
||||||
*/
|
*/
|
||||||
toxPath + 'openstack_dashboard/static/**/*.mock.js',
|
toxPath + 'openstack_dashboard/static/**/*.mock.js',
|
||||||
//'./static/**/*.mock.js',
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finally, list files for spec with `spec.js` extension. The order
|
* Finally, list files for spec with `spec.js` extension. The order
|
||||||
@ -120,7 +118,9 @@ module.exports = function (config) {
|
|||||||
|
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine'],
|
||||||
|
|
||||||
browsers: ['Chrome'],
|
browsers: ['PhantomJS'],
|
||||||
|
|
||||||
|
browserNoActivityTimeout: 60000,
|
||||||
|
|
||||||
phantomjsLauncher: {
|
phantomjsLauncher: {
|
||||||
// Have phantomjs exit if a ResourceError is encountered
|
// Have phantomjs exit if a ResourceError is encountered
|
||||||
@ -131,24 +131,25 @@ module.exports = function (config) {
|
|||||||
reporters: ['progress', 'coverage', 'threshold'],
|
reporters: ['progress', 'coverage', 'threshold'],
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
'karma-chrome-launcher',
|
'karma-phantomjs-launcher',
|
||||||
'karma-jasmine',
|
'karma-jasmine',
|
||||||
'karma-ng-html2js-preprocessor',
|
'karma-ng-html2js-preprocessor',
|
||||||
'karma-coverage',
|
'karma-coverage',
|
||||||
'karma-threshold-reporter'
|
'karma-threshold-reporter'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// Places coverage report in HTML format in the subdirectory below.
|
||||||
coverageReporter: {
|
coverageReporter: {
|
||||||
type: 'html',
|
type: 'html',
|
||||||
dir: '../cover/zun_ui'
|
dir: '../cover/karma/'
|
||||||
},
|
},
|
||||||
|
|
||||||
// Coverage threshold values.
|
// Coverage threshold values.
|
||||||
thresholdReporter: {
|
thresholdReporter: {
|
||||||
statements: 45,
|
statements: 10, // target 100
|
||||||
branches: 0,
|
branches: 0, // target 100
|
||||||
functions: 15,
|
functions: 10, // target 100
|
||||||
lines: 45
|
lines: 10 // target 100
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user