Skip to content

Commit

Permalink
Repair npm run test
Browse files Browse the repository at this point in the history
  • Loading branch information
earshinov committed Aug 27, 2019
1 parent 77f2466 commit 268534b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"karmaConfig": "karma.conf.js",
"scripts": [],
"styles": [],
"tsConfig": "demo/src/tsconfig.json",
"assets": [
"demo/src/assets"
]
Expand Down Expand Up @@ -111,4 +112,4 @@
"prefix": ""
}
}
}
}
14 changes: 3 additions & 11 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,18 @@ module.exports = function (config) {
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
files: [
{pattern: './scripts/test.ts', watched: false}
],
preprocessors: {
'./scripts/test.ts': ['@angular-devkit/build-angular']
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: false
},

reporters: config.angularCli && config.angularCli.codeCoverage
? ['dots', 'coverage-istanbul']
: ['dots'],

reporters: ['dots', 'coverage-istanbul'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
singleRun: true,
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"build.watch": "ngm build -p src --watch --skip-bundles",
"start": "ng serve --aot",
"pretest": "run-s lint build link",
"test": "ng test -sr",
"test-coverage": "ng test -sr -cc",
"test": "ng test",
"test-coverage": "ng test --code-coverage",
"version": "npm run flow.changelog && git add -A"
},
"main": "bundles/ng2-file-upload.umd.js",
Expand Down

0 comments on commit 268534b

Please sign in to comment.