Skip to content

Commit

Permalink
Remove code coverage setup (#11198)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored Nov 1, 2018
1 parent b7d8fbf commit 2388f17
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 62 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
build
build-module
coverage
node_modules
test/e2e/test-plugins
vendor
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
build
build-module
build-style
coverage
node_modules
gutenberg.zip
languages/gutenberg.pot
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Gutenberg
[![Build Status](https://img.shields.io/travis/WordPress/gutenberg/master.svg)](https://travis-ci.org/WordPress/gutenberg)
[![Coverage](https://img.shields.io/codecov/c/github/WordPress/gutenberg/master.svg)](https://codecov.io/gh/WordPress/gutenberg)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)

Printing since 1440.
Expand Down
9 changes: 0 additions & 9 deletions codecov.yml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/reference/testing-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,6 @@ test( 'should contain mars if planets is true', () => {
It's tempting to snapshot deep renders, but that makes for huge snapshots. Additionally, deep renders no longer test a single component, but an entire tree. With `shallow`, we snapshot just the components that are directly rendered by the component we want to test.

### Code Coverage

Code coverage is measured for each PR using the [codecov.io](https://codecov.io/gh/WordPress/gutenberg) tool.
[Code coverage](https://en.wikipedia.org/wiki/Code_coverage) is a way of measuring the amount of code covered by the tests in the test suite of a project. In Gutenberg, it is currently measured for JavaScript code only.

## End to end Testing

If you're using the built-in [local environment](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#local-environment), you can run the e2e tests locally using this command:
Expand Down
1 change: 0 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"exclude": [
"build",
"build-module",
"coverage",
"node_modules",
"test/e2e/test-plugins",
"vendor"
Expand Down
23 changes: 0 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"babel-loader": "8.0.0",
"chalk": "2.4.1",
"check-node-version": "3.1.1",
"codecov": "3.0.2",
"concurrently": "3.5.0",
"copy-webpack-plugin": "4.5.2",
"core-js": "2.5.7",
Expand Down Expand Up @@ -151,7 +150,7 @@
"check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2\" \"wp-scripts check-licenses --dev\"",
"precheck-local-changes": "npm run docs:build",
"check-local-changes": "( git diff -U0 | xargs -0 node bin/process-git-diff ) || ( echo \"There are local uncommitted changes after one or both of 'npm install' or 'npm run docs:build'!\" && exit 1 );",
"ci": "concurrently \"npm run lint\" \"npm run test-unit:coverage-ci\" \"npm run check-local-changes\"",
"ci": "concurrently \"npm run lint\" \"npm run test-unit:ci\" \"npm run check-local-changes\"",
"predev": "npm run check-engines",
"dev": "npm run build:packages && concurrently \"cross-env webpack --watch\" \"npm run dev:packages\"",
"dev:packages": "node ./bin/packages/watch.js",
Expand Down Expand Up @@ -180,10 +179,9 @@
"test-e2e:watch": "npm run test-e2e -- --watch",
"test-php": "npm run lint-php && npm run test-unit-php",
"test-unit": "wp-scripts test-unit-js --config test/unit/jest.config.json",
"test-unit:coverage": "npm run test-unit -- --coverage",
"test-unit:coverage-ci": "npm run test-unit -- --coverage --maxWorkers 1 && codecov",
"test-unit:update": "npm run test-unit -- --updateSnapshot",
"test-unit:watch": "npm run test-unit -- --watch",
"test-unit:ci": "npm run test-unit -- --ci --runInBand",
"test-unit-php": "docker-compose run --rm wordpress_phpunit phpunit",
"test-unit-php-multisite": "docker-compose run -e WP_MULTISITE=1 --rm wordpress_phpunit phpunit"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/jest-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 3.0.0 (Unreleased)

### Breaking Change

- Remove coverage support.

## 2.0.0 (2018-07-12)

### Breaking Change
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-preset-default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ npm install @wordpress/jest-preset-default --save-dev

#### Brief explanations of options included

* `coverageDirectory` - the directory where Jest outputs its coverage files is set to `coverage`.
* `coveragePathIgnorePatterns` - coverage information will be skipped for all folders named `build` and `build-module`.
* `moduleNameMapper` - all `css` and `scss` files containing CSS styles will be stubbed out.
* `modulePaths` - the root dir of the project is used as a location to search when resolving modules.
* `setupFiles` - runs code before each test which sets up global variables required in the testing environment.
Expand Down
7 changes: 0 additions & 7 deletions packages/jest-preset-default/jest-preset.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{
"coverageDirectory": "coverage",
"coveragePathIgnorePatterns": [
"/node_modules/",
"<rootDir>/.*/build/",
"<rootDir>/.*/build-module/",
"<rootDir>/.*/test/"
],
"moduleNameMapper": {
"\\.(scss|css)$": "<rootDir>/node_modules/@wordpress/jest-preset-default/scripts/style-mock.js"
},
Expand Down
8 changes: 0 additions & 8 deletions test/unit/jest.config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"rootDir": "../../",
"collectCoverageFrom": [ "packages/**/*.js" ],
"coveragePathIgnorePatterns": [
"/node_modules/",
"<rootDir>/.*/build/",
"<rootDir>/.*/build-module/",
"<rootDir>/packages/.*/benchmark/",
"<rootDir>/packages/.*/test/"
],
"moduleNameMapper": {
"@wordpress\\/(block-serialization-spec-parser|is-shallow-equal)$": "packages/$1",
"@wordpress\\/([a-z0-9-]+)$": "packages/$1/src"
Expand Down

0 comments on commit 2388f17

Please sign in to comment.