Browse Source

added code coverage

tags/2.3.7
dotnetCarpenter 7 years ago
parent
commit
3e614d4fe9
No account linked to committer's email address
7 changed files with 27 additions and 8 deletions
  1. 16
    2
      .config/karma.conf.js
  2. 2
    1
      .gitignore
  3. 1
    0
      .travis.yml
  4. 1
    0
      README.md
  5. 1
    1
      dist/svg.js
  6. 2
    2
      gulpfile.js
  7. 4
    2
      package.json

+ 16
- 2
.config/karma.conf.js View File

@@ -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

+ 2
- 1
.gitignore View File

@@ -8,4 +8,5 @@ obsolete/
test/
src/index.js
node_modules/
.vscode/
.vscode/
coverage/

+ 1
- 0
.travis.yml View File

@@ -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
- 0
README.md View File

@@ -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.


+ 1
- 1
dist/svg.js View File

@@ -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) {

+ 2
- 2
gulpfile.js View File

@@ -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' }))
})

+ 4
- 2
package.json View File

@@ -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"
}
}

Loading…
Cancel
Save