Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Adds coveralls coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
etgrieco committed Apr 16, 2018
1 parent 2f40ac4 commit f8637c9
Show file tree
Hide file tree
Showing 6 changed files with 1,094 additions and 30 deletions.
6 changes: 5 additions & 1 deletion .babelrc
@@ -1 +1,5 @@
{ "presets": ["es2015"] }
{
"presets": ["es2015"],
"plugins": ["istanbul"],
"sourceMaps": "both"
}
1 change: 1 addition & 0 deletions .npmignore
@@ -0,0 +1 @@
coverage/
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://travis-ci.org/NYULibraries/primo-explore-libraryh3lp-widget.svg?branch=master)](https://travis-ci.org/NYULibraries/primo-explore-libraryh3lp-widget)
[![npm version](https://img.shields.io/npm/v/primo-explore-libraryh3lp-widget.svg)](https://www.npmjs.com/package/primo-explore-libraryh3lp-widget)
[![Coverage Status](https://coveralls.io/repos/github/NYULibraries/primo-explore-libraryh3lp-widget/badge.svg?branch=master)](https://coveralls.io/github/NYULibraries/primo-explore-libraryh3lp-widget?branch=master)

## Description

Expand Down
13 changes: 8 additions & 5 deletions karma.conf.js
@@ -1,24 +1,27 @@
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
reporters: ['spec'],
reporters: ['spec', 'coverage', 'coveralls'],
browsers: ['PhantomJS'],
files: [
'spec/fixtures/**/*.json',
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/@babel/polyfill/dist/polyfill.js',
'js/**/*.js',
'spec/**/*.js',
'spec/**/*.spec.js'
],
preprocessors: {
'js/**/*.js': ['babel'],
'spec/**/*.spec.js': ['babel'],
'js/**/*.js': ['babel', 'sourcemap'],
'spec/**/*.spec.js': ['babel', 'sourcemap'],
'spec/fixtures/**/*.json': ['json_fixtures'],
},
jsonFixturesPreprocessor: {
stripPrefix: "spec/fixtures/"
}
},
coverageReporter: {
type: 'lcov',
dir: 'coverage/'
}
});
};
4 changes: 4 additions & 0 deletions package.json
Expand Up @@ -24,14 +24,18 @@
"angular": "^1.6.9",
"angular-mocks": "^1.6.9",
"babel-core": "^6.26.0",
"babel-plugin-istanbul": "^4.1.6",
"babel-preset-es2015": "^6.24.1",
"jasmine-core": "^2.99.1",
"karma": "^2.0.0",
"karma-babel-preprocessor": "^7.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^1.1.1",
"karma-coveralls": "^1.1.2",
"karma-jasmine": "^1.1.1",
"karma-json-fixtures-preprocessor": "^0.0.6",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.32"
},
"homepage": "https://github.com/nyulibraries/primo-explore-libraryh3lp-widget#readme"
Expand Down

0 comments on commit f8637c9

Please sign in to comment.