diff options
author | dotnetCarpenter <jon.ronnenberg@gmail.com> | 2016-11-13 00:20:28 +0100 |
---|---|---|
committer | dotnetCarpenter <jon.ronnenberg@gmail.com> | 2016-11-13 00:23:52 +0100 |
commit | 3e614d4fe9670fb952d057b0407f6d651e45f71d (patch) | |
tree | 080199e269123b29ccb1524a45de385a6f44aaba | |
parent | 29f3113b1f911e6a1c3c51c52f1b1485973a4fff (diff) | |
download | svg.js-3e614d4fe9670fb952d057b0407f6d651e45f71d.tar.gz svg.js-3e614d4fe9670fb952d057b0407f6d651e45f71d.zip |
added code coverage
-rw-r--r-- | .config/karma.conf.js | 18 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | dist/svg.js | 2 | ||||
-rw-r--r-- | gulpfile.js | 4 | ||||
-rw-r--r-- | package.json | 6 |
7 files changed, 27 insertions, 8 deletions
diff --git a/.config/karma.conf.js b/.config/karma.conf.js index ad256e2..174fe13 100644 --- a/.config/karma.conf.js +++ b/.config/karma.conf.js @@ -37,13 +37,27 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: {}, + preprocessors: { + 'dist/svg.js': ['coverage'] + }, // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], + reporters: ['progress', 'coverage'], + + + // configure the coverage reporter + coverageReporter: { + // Specify a reporter type. + type: 'lcov', + dir: 'coverage/', + subdir: function(browser) { + // normalization process to keep a consistent browser name accross different OS + return browser.toLowerCase().split(/[ /-]/)[0]; // output the results into: './coverage/firefox/' + } + }, // web server port @@ -8,4 +8,5 @@ obsolete/ test/ src/index.js node_modules/ -.vscode/
\ No newline at end of file +.vscode/ +coverage/ diff --git a/.travis.yml b/.travis.yml index 5ea821f..a66a428 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ node_js: script: - npm run build - npm test + - cat coverage/firefox/lcov.info | node_modules/.bin/coveralls #sudo: required #dist: trusty addons: @@ -1,6 +1,7 @@ # SVG.js [![Build Status](https://travis-ci.org/svgdotjs/svg.js.svg?branch=master)](https://travis-ci.org/svgdotjs/svg.js) +[![Coverage Status](https://coveralls.io/repos/github/svgdotjs/svg.js/badge.svg?branch=master)](https://coveralls.io/github/svgdotjs/svg.js?branch=master) A lightweight library for manipulating and animating SVG. diff --git a/dist/svg.js b/dist/svg.js index ad8abda..54ba2a4 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -6,7 +6,7 @@ * @copyright Wout Fierens <wout@mick-wout.com.com> * @license MIT * -* BUILT: Sat Nov 12 2016 22:04:58 GMT+0100 (CET) +* BUILT: Sun Nov 13 2016 00:23:29 GMT+0100 (CET) */; (function(root, factory) { if (typeof define === 'function' && define.amd) { diff --git a/gulpfile.js b/gulpfile.js index d02081f..9d7c4de 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -100,7 +100,7 @@ gulp.task('unify', ['clean'], function() { .pipe(wrapUmd({ src: 'src/umd.js'}))
.pipe(header(headerLong, { pkg: pkg }))
.pipe(trim({ leading: false }))
- .pipe(chmod(644))
+ .pipe(chmod(0o644))
.pipe(gulp.dest('dist'))
.pipe(size({ showFiles: true, title: 'Full' }))
})
@@ -116,7 +116,7 @@ gulp.task('minify', ['unify'], function() { .pipe(rename({ suffix:'.min' }))
.pipe(size({ showFiles: true, title: 'Minified' }))
.pipe(header(headerShort, { pkg: pkg }))
- .pipe(chmod(644))
+ .pipe(chmod(0o644))
.pipe(gulp.dest('dist'))
.pipe(size({ showFiles: true, gzip: true, title: 'Gzipped' }))
})
diff --git a/package.json b/package.json index a995821..b983c79 100644 --- a/package.json +++ b/package.json @@ -59,9 +59,10 @@ "docs": "gulp docs" }, "devDependencies": { + "coveralls": "^2.11.15", "del": "^2.2.0", "gulp": "^3.8.6", - "gulp-chmod": "^1.2.0", + "gulp-chmod": "^2.0.0", "gulp-cli": "^1.2.2", "gulp-concat": "^2.3.3", "gulp-header": "^1.0.5", @@ -72,8 +73,9 @@ "gulp-wrap": "^0.13.0", "jasmine-core": "^2.5.2", "karma": "^1.3.0", + "karma-coverage": "^1.1.1", "karma-firefox-launcher": "^1.0.0", "karma-jasmine": "^1.0.2", - "request": "^2.75.0" + "request": "^2.78.0" } } |