Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
Revert "#2 configure karma for coverage analysis"
Browse files Browse the repository at this point in the history
This reverts commit eab7fb8.
  • Loading branch information
maybeec committed Aug 10, 2016
1 parent 41fb43f commit ac99fdf
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 1,509 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ cache:
- oasp4js-sample/node_modules
before_install:
- cd oasp4js-sample
- npm install -g gulp
after_success:
- cat ./report/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- cat ./test/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
2 changes: 1 addition & 1 deletion oasp4js-sample/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# misc
/.sass-cache
/connect.lock
/report/*
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log
Expand Down
54 changes: 7 additions & 47 deletions oasp4js-sample/config/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
module.exports = function (config) {
'use strict';
config.set({
basePath: '..',
frameworks: ['jasmine', 'browserify'],
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-coverage'),
require('karma-browserify'),
require('karma-mocha-reporter'),
require('karma-phantomjs-launcher'),
require('mocha')
require('karma-chrome-launcher')
],
customLaunchers: {
// chrome setup for travis CI using chromium
Expand All @@ -26,7 +20,7 @@ module.exports = function (config) {
{ pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false },
{ pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false },
{ pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false },

{ pattern: 'config/karma-test-shim.js', included: true, watched: true },

// Distribution folder.
Expand All @@ -36,47 +30,13 @@ module.exports = function (config) {
// Vendor packages might include spec files. We don't want to use those.
'dist/vendor/**/*.spec.js'
],

preprocessors: {},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: [
'PhantomJS'
],
singleRun: true,

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'**/*.ts': ['browserify']
},

browserify: {
debug: true,
transform: [
['browserify-istanbul', {
instrumenter: require('isparta'),
ignore: ['**/*.spec.ts','**/*.d.ts'],
}]
],
plugin: [
['tsify']
]
},

// options on how to report coverage:
coverageReporter: {
reporters: [
{type: 'text'},
{type: 'lcov', dir: 'report/coverage', subdir: '.'}
]
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha', 'coverage'],

browsers: ['Chrome'],
singleRun: false
});
};
11 changes: 1 addition & 10 deletions oasp4js-sample/e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,5 @@
"sourceMap": true,
"sourceRoot": "/",
"target": "es5"
},
"filesGlob": [
"**/*.ts",
"!node_modules/**/*"
],
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
]
}
}
Loading

0 comments on commit ac99fdf

Please sign in to comment.