Skip to content

Commit 933961e

Browse files
Benjamin Coeichernev
Benjamin Coe
authored andcommitted
add coverage reporting using nyc and coveralls
1 parent 6f33c70 commit 933961e

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ sauce_connect.log
77
npm-debug.log
88
.build*
99
build
10+
coverage
11+
nyc_output

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ script: grunt build:travis
1414

1515
git:
1616
depth: 10
17+
18+
after_success: npm run coveralls

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[![Join the chat at https://gitter.im/moment/moment](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/moment/moment?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
22

33
[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url]
4+
[![Coverage Status](https://coveralls.io/repos/moment/moment/badge.svg?branch=master)](https://coveralls.io/r/moment/moment?branch=master)
45

56
A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
67

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@
6161
"karma-sauce-launcher": "latest",
6262
"qunit": "^0.7.5",
6363
"qunit-cli": "^0.1.4",
64-
"spacejam": "latest"
64+
"spacejam": "latest",
65+
"coveralls": "^2.11.2",
66+
"nyc": "^2.1.4"
6567
},
6668
"ender": "./ender.js",
6769
"dojoBuild": "package.js",
@@ -78,7 +80,9 @@
7880
}
7981
},
8082
"scripts": {
81-
"test": "grunt test"
83+
"test": "grunt test",
84+
"coverage": "nyc npm test && nyc report",
85+
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls"
8286
},
8387
"spm": {
8488
"main": "moment.js",

0 commit comments

Comments
 (0)