Skip to content

Commit

Permalink
docs: Fix URL to default excludes in README.md (#1214)
Browse files Browse the repository at this point in the history
Also remove some trailing white-space and correct a spelling mistake.
  • Loading branch information
Sintendo authored and coreyfarrell committed Oct 27, 2019
1 parent 3726bbb commit f890360
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -78,7 +78,7 @@ You can then add the specific configuration options you want that aren't in that

### Configuration files

Any configuration options that can be set via the command line can also be specified in the `nyc` stanza of your package.json, or within a seperate configuration file - a variety of flavors are available:
Any configuration options that can be set via the command line can also be specified in the `nyc` stanza of your package.json, or within a separate configuration file - a variety of flavors are available:

| File name | File Association |
|-----------------|------------------|
Expand Down Expand Up @@ -108,7 +108,7 @@ This table is a quick TLDR for the rest of this readme and there are more advanc

Configuration can also be provided by `nyc.config.js` if programmed logic is required:
```js
'use strict';
'use strict';
const {defaultExclude} = require('test-exclude');
const isWindows = require('is-windows');

Expand Down Expand Up @@ -142,7 +142,7 @@ module.exports = {

By default, nyc only collects coverage for source files that are visited during a test.
It does this by watching for files that are `require()`'d during the test.
When a file is `require()`'d, nyc creates and returns an instrumented version of the source, rather than the original.
When a file is `require()`'d, nyc creates and returns an instrumented version of the source, rather than the original.
Only source files that are visited during a test will appear in the coverage report and contribute to coverage statistics.

nyc will instrument all files if the `--all` flag is set or if running `nyc instrument`.
Expand Down Expand Up @@ -172,7 +172,7 @@ You can also specify negated paths in the `exclude` array, by prefixing them wit
Negated paths can restore paths that have been already been excluded in the `exclude` array.
Multiple `exclude` globs can be specified on the command line, each must follow a `--exclude`, `-x` switch.

The default `exclude` list is defined in the [test-exclude module](https://github.com/istanbuljs/istanbuljs/blob/master/packages/test-exclude/default-exclude.js).
The default `exclude` list is defined in the [@istanbuljs/schema module](https://github.com/istanbuljs/schema/blob/master/default-exclude.js).
Specifying your own exclude property completely replaces these defaults.

For example, the following config will collect coverage for every file in the `src` directory regardless of whether it is `require()`'d in a test.
Expand Down Expand Up @@ -200,7 +200,7 @@ To prevent this, wrap each glob in single quotes.
We always add `**/node_modules/**` to the exclude list, even if not specified in the config.
You can override this by setting `--exclude-node-modules=false`.

For example, in the following config, `"excludeNodeModules: false"` will prevent `node_modules` from being added to the exclude rules.
For example, in the following config, `"excludeNodeModules: false"` will prevent `node_modules` from being added to the exclude rules.
The set of include rules then restrict nyc to only consider instrumenting files found under the `lib/` and `node_modules/@my-org/` directories.
The exclude rules then prevent nyc instrumenting anything in a `test` folder and the file `node_modules/@my-org/something/unwanted.js`.

Expand Down

0 comments on commit f890360

Please sign in to comment.