Skip to content
This repository was archived by the owner on Nov 26, 2021. It is now read-only.

Commit db3d24e

Browse files
committed
fix coverage
1 parent a6afd58 commit db3d24e

File tree

3 files changed

+51
-32
lines changed

3 files changed

+51
-32
lines changed

.babelrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,12 @@
33
"es2015",
44
"stage-0",
55
"react"
6-
]
6+
],
7+
"env": {
8+
"test": {
9+
"plugins": [
10+
"istanbul"
11+
]
12+
}
13+
}
714
}

package.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "react-validate-framework",
3-
"version": "0.14.1",
3+
"version": "0.14.2",
44
"description": "React validation framework.",
55
"main": "lib/index.js",
66
"scripts": {
77
"lint": "eslint src config example --ext .js,.jsx --fix",
88
"start": "better-npm-run start",
9-
"test": "nyc mocha --compilers js:babel-core/register --colors ./test/setup.js",
9+
"test": "better-npm-run test",
1010
"coverage": "nyc report --reporter=text-lcov | coveralls",
1111
"build:example": "rimraf build && better-npm-run build:example",
1212
"deploy": "rimraf lib && better-npm-run prod"
@@ -19,6 +19,13 @@
1919
"DEBUG": "app:*"
2020
}
2121
},
22+
"test": {
23+
"command": "nyc mocha ./test/setup.js",
24+
"env": {
25+
"NODE_ENV": "test",
26+
"DEBUG": "app:*"
27+
}
28+
},
2229
"build:example": {
2330
"command": "babel-node config/compile.js",
2431
"env": {
@@ -50,6 +57,13 @@
5057
"url": "https://github.com/MinJieLiu/react-validate-framework/issues"
5158
},
5259
"homepage": "https://github.com/MinJieLiu/react-validate-framework#readme",
60+
"nyc": {
61+
"require": [
62+
"babel-register"
63+
],
64+
"sourceMap": false,
65+
"instrument": false
66+
},
5367
"dependencies": {
5468
"lodash": "^4.17.4",
5569
"prop-types": "^15.5.10",
@@ -60,6 +74,7 @@
6074
"babel-core": "^6.21.0",
6175
"babel-eslint": "^7.1.1",
6276
"babel-loader": "^6.2.10",
77+
"babel-plugin-istanbul": "^4.1.4",
6378
"babel-polyfill": "^6.23.0",
6479
"babel-preset-es2015": "^6.18.0",
6580
"babel-preset-react": "^6.16.0",

yarn.lock

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,14 @@ babel-plugin-check-es2015-constants@^6.22.0:
462462
dependencies:
463463
babel-runtime "^6.22.0"
464464

465+
babel-plugin-istanbul@^4.1.4:
466+
version "4.1.4"
467+
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587"
468+
dependencies:
469+
find-up "^2.1.0"
470+
istanbul-lib-instrument "^1.7.2"
471+
test-exclude "^4.1.1"
472+
465473
babel-plugin-syntax-async-functions@^6.8.0:
466474
version "6.13.0"
467475
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
@@ -1996,10 +2004,6 @@ esprima@^2.6.0, esprima@^2.7.1:
19962004
version "2.7.3"
19972005
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
19982006

1999-
esprima@^3.1.1:
2000-
version "3.1.3"
2001-
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
2002-
20032007
esquery@^1.0.0:
20042008
version "1.0.0"
20052009
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa"
@@ -2874,7 +2878,7 @@ istanbul-lib-hook@^1.0.7:
28742878
dependencies:
28752879
append-transform "^0.4.0"
28762880

2877-
istanbul-lib-instrument@^1.7.3:
2881+
istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.3:
28782882
version "1.7.3"
28792883
resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.3.tgz#925b239163eabdd68cc4048f52c2fa4f899ecfa7"
28802884
dependencies:
@@ -2925,20 +2929,13 @@ js-tokens@^3.0.0:
29252929
version "3.0.1"
29262930
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
29272931

2928-
js-yaml@3.6.1:
2932+
js-yaml@3.6.1, js-yaml@^3.5.1:
29292933
version "3.6.1"
29302934
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
29312935
dependencies:
29322936
argparse "^1.0.7"
29332937
esprima "^2.6.0"
29342938

2935-
js-yaml@^3.5.1:
2936-
version "3.8.4"
2937-
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6"
2938-
dependencies:
2939-
argparse "^1.0.7"
2940-
esprima "^3.1.1"
2941-
29422939
js-yaml@~3.7.0:
29432940
version "3.7.0"
29442941
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
@@ -4463,56 +4460,56 @@ repeating@^2.0.0:
44634460
dependencies:
44644461
is-finite "^1.0.0"
44654462

4466-
request@2, request@^2.79.0, request@^2.81.0:
4467-
version "2.81.0"
4468-
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
4463+
request@2, request@2.79.0, request@^2.79.0:
4464+
version "2.79.0"
4465+
resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
44694466
dependencies:
44704467
aws-sign2 "~0.6.0"
44714468
aws4 "^1.2.1"
4472-
caseless "~0.12.0"
4469+
caseless "~0.11.0"
44734470
combined-stream "~1.0.5"
44744471
extend "~3.0.0"
44754472
forever-agent "~0.6.1"
44764473
form-data "~2.1.1"
4477-
har-validator "~4.2.1"
4474+
har-validator "~2.0.6"
44784475
hawk "~3.1.3"
44794476
http-signature "~1.1.0"
44804477
is-typedarray "~1.0.0"
44814478
isstream "~0.1.2"
44824479
json-stringify-safe "~5.0.1"
44834480
mime-types "~2.1.7"
44844481
oauth-sign "~0.8.1"
4485-
performance-now "^0.2.0"
4486-
qs "~6.4.0"
4487-
safe-buffer "^5.0.1"
4482+
qs "~6.3.0"
44884483
stringstream "~0.0.4"
44894484
tough-cookie "~2.3.0"
4490-
tunnel-agent "^0.6.0"
4485+
tunnel-agent "~0.4.1"
44914486
uuid "^3.0.0"
44924487

4493-
request@2.79.0:
4494-
version "2.79.0"
4495-
resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
4488+
request@^2.81.0:
4489+
version "2.81.0"
4490+
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
44964491
dependencies:
44974492
aws-sign2 "~0.6.0"
44984493
aws4 "^1.2.1"
4499-
caseless "~0.11.0"
4494+
caseless "~0.12.0"
45004495
combined-stream "~1.0.5"
45014496
extend "~3.0.0"
45024497
forever-agent "~0.6.1"
45034498
form-data "~2.1.1"
4504-
har-validator "~2.0.6"
4499+
har-validator "~4.2.1"
45054500
hawk "~3.1.3"
45064501
http-signature "~1.1.0"
45074502
is-typedarray "~1.0.0"
45084503
isstream "~0.1.2"
45094504
json-stringify-safe "~5.0.1"
45104505
mime-types "~2.1.7"
45114506
oauth-sign "~0.8.1"
4512-
qs "~6.3.0"
4507+
performance-now "^0.2.0"
4508+
qs "~6.4.0"
4509+
safe-buffer "^5.0.1"
45134510
stringstream "~0.0.4"
45144511
tough-cookie "~2.3.0"
4515-
tunnel-agent "~0.4.1"
4512+
tunnel-agent "^0.6.0"
45164513
uuid "^3.0.0"
45174514

45184515
require-directory@^2.1.1:

0 commit comments

Comments
 (0)