add parseBytes utility function and tests (#1239)

* add parseBytes utility function and tests
make it parse TB MB
fix parseBytes; * 1024
test bytes too, and make parseByte to parse quotas
add test in travis.sh in misc

* fix parseBytes and test to pass linting
This commit is contained in:
BRAINS YUM
2018-10-13 01:43:55 -05:00
committed by Chocobozzz
parent 6e5a785b20
commit 0e5ff97f6f
5 changed files with 105 additions and 5 deletions

View File

@@ -11,8 +11,11 @@ killall -q peertube || true
if [ "$1" = "misc" ]; then
npm run build -- --light-fr
mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/client.ts server/tests/activitypub.ts \
server/tests/feeds/index.ts server/tests/misc-endpoints.ts
mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/client.ts \
server/tests/activitypub.ts \
server/tests/feeds/index.ts \
server/tests/misc-endpoints.ts \
server/tests/helpers/index.ts
elif [ "$1" = "api" ]; then
npm run build:server
mocha --timeout 5000 --exit --require ts-node/register/type-check --bail server/tests/api/index.ts