You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ You can then add the specific configuration options you want that aren't in that
78
78
79
79
### Configuration files
80
80
81
-
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:
81
+
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:
82
82
83
83
| File name | File Association |
84
84
|-----------------|------------------|
@@ -108,7 +108,7 @@ This table is a quick TLDR for the rest of this readme and there are more advanc
108
108
109
109
Configuration can also be provided by `nyc.config.js` if programmed logic is required:
110
110
```js
111
-
'use strict';
111
+
'use strict';
112
112
const {defaultExclude} =require('test-exclude');
113
113
constisWindows=require('is-windows');
114
114
@@ -142,7 +142,7 @@ module.exports = {
142
142
143
143
By default, nyc only collects coverage for source files that are visited during a test.
144
144
It does this by watching for files that are `require()`'d during the test.
145
-
When a file is `require()`'d, nyc creates and returns an instrumented version of the source, rather than the original.
145
+
When a file is `require()`'d, nyc creates and returns an instrumented version of the source, rather than the original.
146
146
Only source files that are visited during a test will appear in the coverage report and contribute to coverage statistics.
147
147
148
148
nyc will instrument all files if the `--all` flag is set or if running `nyc instrument`.
@@ -172,7 +172,7 @@ You can also specify negated paths in the `exclude` array, by prefixing them wit
172
172
Negated paths can restore paths that have been already been excluded in the `exclude` array.
173
173
Multiple `exclude` globs can be specified on the command line, each must follow a `--exclude`, `-x` switch.
174
174
175
-
The default `exclude` list is defined in the [test-exclude module](https://github.com/istanbuljs/istanbuljs/blob/master/packages/test-exclude/default-exclude.js).
175
+
The default `exclude` list is defined in the [@istanbuljs/schema module](https://github.com/istanbuljs/schema/blob/master/default-exclude.js).
176
176
Specifying your own exclude property completely replaces these defaults.
177
177
178
178
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.
@@ -200,7 +200,7 @@ To prevent this, wrap each glob in single quotes.
200
200
We always add `**/node_modules/**` to the exclude list, even if not specified in the config.
201
201
You can override this by setting `--exclude-node-modules=false`.
202
202
203
-
For example, in the following config, `"excludeNodeModules: false"` will prevent `node_modules` from being added to the exclude rules.
203
+
For example, in the following config, `"excludeNodeModules: false"` will prevent `node_modules` from being added to the exclude rules.
204
204
The set of include rules then restrict nyc to only consider instrumenting files found under the `lib/` and `node_modules/@my-org/` directories.
205
205
The exclude rules then prevent nyc instrumenting anything in a `test` folder and the file `node_modules/@my-org/something/unwanted.js`.
0 commit comments