diff --git a/bin/build.sh b/bin/build.sh index ff90c288d..698c5ccdc 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +echo "Running tests" + +npm run test-all || { echo 'unit tests failed' ; exit 1; } + echo "Deleting existing builds" rm -rf dist/* diff --git a/package.json b/package.json index 272cfad4e..97ad90f6f 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "build-docs": "npm run build-backend-docs && npm run build-frontend-docs", "webpack": "npx webpack -c webpack-desktop.config.js && npx webpack -c webpack-mobile.config.js && npx webpack -c webpack-setup.config.js", "test": "jasmine", - "test-es6": "node -r esm spec-es6/attribute_parser.spec.js " + "test-es6": "node -r esm spec-es6/attribute_parser.spec.js ", + "test-all": "npm run test && npm run test-es6" }, "dependencies": { "async-mutex": "0.2.4",