Commit 6823793
committed
chore: document how to include TypeScript files in generated report
closes #73
TypeScript source files are NOT included in the code coverage report by
default, even if they are properly instrumented. In order to tell `nyc`
to include TS files in the report, you need to:
1. Add these dev dependencies that let Istanbul work with TypeScript
```shell
npm i -D @istanbuljs/nyc-config-typescript source-map-support ts-node
```
2. In `package.json` use the following `nyc` configuration object
```json
{
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"all": true
}
}
```1 parent 31c03d7 commit 6823793
1 file changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
165 | 186 | | |
166 | 187 | | |
167 | 188 | | |
| |||
0 commit comments