Repair npm run test

This commit is contained in:
Eugene Arshinov
2019-08-26 21:28:12 +03:00
committed by Evgeny Arshinov
parent 77f2466f17
commit 268534b3e1
3 changed files with 7 additions and 14 deletions

View File

@@ -65,6 +65,7 @@
"karmaConfig": "karma.conf.js", "karmaConfig": "karma.conf.js",
"scripts": [], "scripts": [],
"styles": [], "styles": [],
"tsConfig": "demo/src/tsconfig.json",
"assets": [ "assets": [
"demo/src/assets" "demo/src/assets"
] ]
@@ -111,4 +112,4 @@
"prefix": "" "prefix": ""
} }
} }
} }

View File

@@ -13,26 +13,18 @@ module.exports = function (config) {
require('karma-coverage-istanbul-reporter'), require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma') require('@angular-devkit/build-angular/plugins/karma')
], ],
files: [
{pattern: './scripts/test.ts', watched: false}
],
preprocessors: {
'./scripts/test.ts': ['@angular-devkit/build-angular']
},
coverageIstanbulReporter: { coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ], dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: false fixWebpackSourcePaths: false
}, },
reporters: config.angularCli && config.angularCli.codeCoverage reporters: ['dots', 'coverage-istanbul'],
? ['dots', 'coverage-istanbul']
: ['dots'],
port: 9876, port: 9876,
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['Chrome'],
singleRun: false, singleRun: true,
customLaunchers: { customLaunchers: {
Chrome_travis_ci: { Chrome_travis_ci: {
base: 'Chrome', base: 'Chrome',

View File

@@ -18,8 +18,8 @@
"build.watch": "ngm build -p src --watch --skip-bundles", "build.watch": "ngm build -p src --watch --skip-bundles",
"start": "ng serve --aot", "start": "ng serve --aot",
"pretest": "run-s lint build link", "pretest": "run-s lint build link",
"test": "ng test -sr", "test": "ng test",
"test-coverage": "ng test -sr -cc", "test-coverage": "ng test --code-coverage",
"version": "npm run flow.changelog && git add -A" "version": "npm run flow.changelog && git add -A"
}, },
"main": "bundles/ng2-file-upload.umd.js", "main": "bundles/ng2-file-upload.umd.js",