Skip to content

Commit b09d246

Browse files
committed
Add coveralls coverage
1 parent b52d158 commit b09d246

File tree

5 files changed

+50
-7
lines changed

5 files changed

+50
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ dist
22
node_modules
33
.vscode
44
yarn-error.log
5+
.coverage

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ matrix:
1111
- node_js: '9'
1212
script: npm run test -- --runInBand
1313
env: CI=tests 9
14+
- node_js: '9'
15+
script: npm test -- --runInBand --coverage
16+
env: CI=coverage
1417
- node_js: '8'
1518
script: npm run test -- --runInBand
1619
env: CI=tests 8
@@ -19,3 +22,5 @@ matrix:
1922
env: CI=tests 6
2023
before_install:
2124
- npm install -g npm@latest
25+
after_success:
26+
- if [ "$CI" = "coverage" ]; then cat ./.coverage/lcov.info | ./node_modules/.bin/coveralls; fi

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![NPM version](http://img.shields.io/npm/v/react-native-css-media-query-processor.svg)](https://www.npmjs.org/package/react-native-css-media-query-processor)
44
[![Build Status](https://travis-ci.org/kristerkari/react-native-css-media-query-processor.svg?branch=master)](https://travis-ci.org/kristerkari/react-native-css-media-query-processor)
55
[![Build status](https://ci.appveyor.com/api/projects/status/1itowtpn7a51rc5x/branch/master?svg=true)](https://ci.appveyor.com/project/kristerkari/react-native-css-media-query-processor/branch/master)
6+
[![Coverage Status](https://coveralls.io/repos/github/kristerkari/react-native-css-media-query-processor/badge.svg?branch=master)](https://coveralls.io/github/kristerkari/react-native-css-media-query-processor?branch=master)
67
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
78

89
Match style objects containing CSS Media Queries with React Native

package.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"babel-jest": "^22.4.1",
5959
"babel-preset-es2015": "^6.24.1",
6060
"benchmark": "^2.1.4",
61+
"coveralls": "^3.0.0",
6162
"husky": "^0.14.3",
6263
"jest": "^22.4.2",
6364
"lint-staged": "^7.0.0",
@@ -71,6 +72,27 @@
7172
"trailingComma": "none"
7273
},
7374
"babel": {
74-
"presets": ["es2015"]
75+
"presets": [
76+
"es2015"
77+
]
78+
},
79+
"jest": {
80+
"collectCoverageFrom": [
81+
"src/*.js",
82+
"!src/mediaquery.js"
83+
],
84+
"coverageDirectory": "./.coverage/",
85+
"coverageReporters": [
86+
"lcov",
87+
"text"
88+
],
89+
"coverageThreshold": {
90+
"global": {
91+
"branches": 75,
92+
"functions": 75,
93+
"lines": 75,
94+
"statements": 75
95+
}
96+
}
7597
}
7698
}

yarn.lock

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,16 @@ cosmiconfig@^4.0.0:
10111011
parse-json "^4.0.0"
10121012
require-from-string "^2.0.1"
10131013

1014+
coveralls@^3.0.0:
1015+
version "3.0.0"
1016+
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.0.tgz#22ef730330538080d29b8c151dc9146afde88a99"
1017+
dependencies:
1018+
js-yaml "^3.6.1"
1019+
lcov-parse "^0.0.10"
1020+
log-driver "^1.2.5"
1021+
minimist "^1.2.0"
1022+
request "^2.79.0"
1023+
10141024
cross-spawn-async@^2.1.1:
10151025
version "2.2.5"
10161026
resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc"
@@ -1038,10 +1048,6 @@ cryptiles@3.x.x:
10381048
dependencies:
10391049
boom "5.x.x"
10401050

1041-
css-mediaquery@^0.1.2:
1042-
version "0.1.2"
1043-
resolved "https://registry.yarnpkg.com/css-mediaquery/-/css-mediaquery-0.1.2.tgz#6a2c37344928618631c54bd33cedd301da18bea0"
1044-
10451051
cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0":
10461052
version "0.3.2"
10471053
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b"
@@ -2432,7 +2438,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
24322438
version "3.0.2"
24332439
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
24342440

2435-
js-yaml@^3.7.0, js-yaml@^3.9.0:
2441+
js-yaml@^3.6.1, js-yaml@^3.7.0, js-yaml@^3.9.0:
24362442
version "3.11.0"
24372443
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef"
24382444
dependencies:
@@ -2563,6 +2569,10 @@ lcid@^1.0.0:
25632569
dependencies:
25642570
invert-kv "^1.0.0"
25652571

2572+
lcov-parse@^0.0.10:
2573+
version "0.0.10"
2574+
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
2575+
25662576
left-pad@^1.2.0:
25672577
version "1.2.0"
25682578
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
@@ -2677,6 +2687,10 @@ lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5:
26772687
version "4.17.5"
26782688
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
26792689

2690+
log-driver@^1.2.5:
2691+
version "1.2.7"
2692+
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
2693+
26802694
log-symbols@^1.0.2:
26812695
version "1.0.2"
26822696
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"
@@ -3458,7 +3472,7 @@ request@2.81.0:
34583472
tunnel-agent "^0.6.0"
34593473
uuid "^3.0.0"
34603474

3461-
request@^2.83.0:
3475+
request@^2.79.0, request@^2.83.0:
34623476
version "2.85.0"
34633477
resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa"
34643478
dependencies:

0 commit comments

Comments
 (0)