Skip to content

Commit

Permalink
Assertion for filesize in .travis.yml (#8)
Browse files Browse the repository at this point in the history
* clone optimization

* added check/assert for filesize

* added assertion for filesize in .travis.yml

* fixed filesize assertion 1000 -> 1024 bytes
  • Loading branch information
bali182 authored and sdgluck committed Mar 28, 2017
1 parent af562a8 commit 3691b60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: node_js
node_js:
- "6.9"
script:
- npm run assertfilesize
- npm test
notifications:
email: false
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "Immutability in under one kilobyte",
"main": "index.js",
"scripts": {
"test": "node test"
"test": "node test",
"filesize": "node -e \"console.log(require('fs').statSync('index.js').size + ' bytes')\"",
"assertfilesize": "node -e \"require('assert')((require('fs').statSync('index.js').size) < 1024, 'file size exceeds 1KB')\""
},
"author": "Sam Gluck <sdgluck@gmail.com>",
"license": "MIT",
Expand Down

0 comments on commit 3691b60

Please sign in to comment.