mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 13:14:44 +00:00
.
This commit is contained in:
parent
a004f0ae58
commit
fc725ba36b
7280 changed files with 19 additions and 1796407 deletions
56
node_modules/test-exclude/README.md
generated
vendored
56
node_modules/test-exclude/README.md
generated
vendored
|
@ -1,56 +0,0 @@
|
|||
# test-exclude
|
||||
|
||||
The file include/exclude logic used by [nyc](https://github.com/istanbuljs/nyc).
|
||||
|
||||
[](https://travis-ci.org/istanbuljs/test-exclude)
|
||||
[](https://coveralls.io/github/istanbuljs/test-exclude?branch=master)
|
||||
[](https://github.com/conventional-changelog/standard-version)
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const exclude = require('test-exclude');
|
||||
if (exclude().shouldInstrument('./foo.js')) {
|
||||
// let's instrument this file for test coverage!
|
||||
}
|
||||
```
|
||||
|
||||
_you can load configuration from a key in package.json:_
|
||||
|
||||
_package.json_
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "awesome-module",
|
||||
"test": {
|
||||
"include": ["**/index.js"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
_app.js_
|
||||
|
||||
```js
|
||||
const exclude = require('test-exclude');
|
||||
if (exclude({ configKey: 'test' }).shouldInstrument('./index.js')) {
|
||||
// let's instrument this file for test coverage!
|
||||
}
|
||||
```
|
||||
|
||||
## Including node_modules folder
|
||||
|
||||
by default the `node_modules` folder is added to all groups of
|
||||
exclude rules. In the rare case that you wish to instrument files
|
||||
stored in `node_modules`, a negative glob can be used:
|
||||
|
||||
```js
|
||||
const exclude = require('test-exclude');
|
||||
const e = exclude({
|
||||
exclude: ['!**/node_modules/**']
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
ISC
|
Loading…
Add table
Add a link
Reference in a new issue