Skip to content

Build your personal knowledge base with Trilium Notes

add running tests into the build process

zadamb815e10ff32c
diff --git a/bin/build.sh b/bin/build.sh
index ff90c288d9..698c5ccdcb 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 272cfad4e4..97ad90f6fd 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",