Skip to content

Commit

Permalink
Adding a test, fixing a test, adding nyc for test coverage reportin…
Browse files Browse the repository at this point in the history
…g, updating `README.md`, returning `.npmignore`, updating `.gitignore`
  • Loading branch information
avoidwork committed Oct 2, 2023
1 parent cb26761 commit 7a61c30
Show file tree
Hide file tree
Showing 6 changed files with 2,774 additions and 16 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules/*
.idea/*
test/webpack/*
.husky
.nyc_output
node_modules
.idea
test/webpack
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.github
.husky
.nyc_output
src
test
.eslintrc.js
.gitignore
rollup.config.js
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ import {filesize} from "filesize";
filesize(265318, {base: 2, standard: "jedec"}); // "259.1 KB"
```

## Testing

filesize has 100% code coverage with its tests.

```console
--------------|---------|----------|---------|---------|-----------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-----------------------
All files | 100 | 95.52 | 100 | 100 |
filesize.cjs | 100 | 95.52 | 100 | 100 | 77-78,173,196,199,210
--------------|---------|----------|---------|---------|-----------------------
```

## Optional settings

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

0 comments on commit 7a61c30

Please sign in to comment.