Skip to content

Commit

Permalink
Another attempt, with nyc this time
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Oct 19, 2018
1 parent f85ec32 commit c4cacf3
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .babelrc
Expand Up @@ -6,4 +6,13 @@
ignore: [
"packages/enzyme-test-suite/test/_helpers/untranspiled*",
],
"env": {
"test": {
"plugins": [
["transform-replace-object-assign", { "moduleSpecifier": "object.assign" }],
"istanbul",
],
"sourceMaps": "inline",
},
},
}
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -12,6 +12,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
Expand Down
28 changes: 28 additions & 0 deletions .nycrc
@@ -0,0 +1,28 @@
{
"all": true,
"cache": true,
"check-coverage": true,
"reporter": ["text-summary", "text", "html", "json"],
"extension": [".jsx", ".js"],
"sourceMap": false,
"instrument": false,
"lines": 100,
"statements": 100,
"functions": 100,
"branches": 100,
"exclude": [
"_book",
"coverage",
"docs",
"env.js",
"karma.conf.js",
"packages/enzyme/withDom.js",
"packages/enzyme-test-suite",
"packages/enzyme-example-mocha",
"since.js",
"test"
],
"require": [
"babel-register"
]
}
12 changes: 11 additions & 1 deletion package.json
Expand Up @@ -36,6 +36,8 @@
"docs:watch": "npm run docs:prepare && gitbook serve",
"docs:publish": "npm run docs:clean && npm run docs:build && cd _book && git init && git commit --allow-empty -m 'update book' && git fetch git@github.com:airbnb/enzyme.git gh-pages && git checkout -b gh-pages && git add . && git commit -am 'update book' && git push git@github.com:airbnb/enzyme.git gh-pages --force",
"pretravis": "npm run build",
"coverage": "NODE_ENV=test nyc _mocha packages/enzyme-test-suite/test --recursive",
"postcoverage": "nyc report",
"travis": "babel-node \"$(which istanbul)\" cover --report html --report json _mocha -- packages/enzyme-test-suite/test --recursive",
"since": "node since"
},
Expand Down Expand Up @@ -64,6 +66,7 @@
"babel-core": "^6.26.3",
"babel-eslint": "^7.2.3",
"babel-loader": "^6.4.1",
"babel-plugin-istanbul": "^4.1.6",
"babel-plugin-transform-replace-object-assign": "^1.0.0",
"babel-preset-airbnb": "^2.6.0",
"babel-register": "^6.26.0",
Expand Down Expand Up @@ -94,10 +97,17 @@
"karma-webpack": "^1.8.1",
"lerna": "^2.11.0",
"mocha": "^3.5.3",
"nyc": "^10.3.2",
"prop-types": "^15.6.2",
"rimraf": "^2.6.2",
"safe-publish-latest": "^1.1.2",
"webpack": "^1.15.0"
},
"dependencies": {}
"dependencies": {},
"greenkeeper": {
"//": "nyc is ignored because it requires node 4+, and we support older than that",
"ignore": [
"nyc"
]
}
}

0 comments on commit c4cacf3

Please sign in to comment.