Skip to content

Commit 644a446

Browse files
authored
Add missing .nycrc for TypeScript code coverage. Closes feathersjs/feathers#1685
1 parent 43e97e2 commit 644a446

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

guides/basics/testing.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,21 @@ For TypeScript we also have to install the TypeScript reporter:
312312
npm install @istanbuljs/nyc-config-typescript --save-dev
313313
```
314314

315+
Add the following `.nycrc` file:
316+
317+
```json
318+
{
319+
"extends": "@istanbuljs/nyc-config-typescript",
320+
"include": [
321+
"src/**/*.ts",
322+
"src/**/*.tsx"
323+
]
324+
}
325+
```
326+
315327
And then update the `package.json` like this:
316328

317-
```ts
329+
```json
318330
"scripts": {
319331
"test": "npm run compile && npm run coverage",
320332
"dev": "ts-node-dev --no-notify src/",

0 commit comments

Comments
 (0)