Skip to content

Commit 7a61c30

Browse files
committed
Adding a test, fixing a test, adding nyc for test coverage reporting, updating README.md, returning .npmignore, updating .gitignore
1 parent cb26761 commit 7a61c30

6 files changed

+2774
-16
lines changed

.gitignore

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
node_modules/*
2-
.idea/*
3-
test/webpack/*
1+
.husky
2+
.nyc_output
3+
node_modules
4+
.idea
5+
test/webpack

.npmignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.github
2+
.husky
3+
.nyc_output
4+
src
5+
test
6+
.eslintrc.js
7+
.gitignore
8+
rollup.config.js

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ import {filesize} from "filesize";
99
filesize(265318, {base: 2, standard: "jedec"}); // "259.1 KB"
1010
```
1111

12+
## Testing
13+
14+
filesize has 100% code coverage with its tests.
15+
16+
```console
17+
--------------|---------|----------|---------|---------|-----------------------
18+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
19+
--------------|---------|----------|---------|---------|-----------------------
20+
All files | 100 | 95.52 | 100 | 100 |
21+
filesize.cjs | 100 | 95.52 | 100 | 100 | 77-78,173,196,199,210
22+
--------------|---------|----------|---------|---------|-----------------------
23+
```
24+
1225
## Optional settings
1326

1427
`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output.

0 commit comments

Comments
 (0)