do unit test when building frontend files

This commit is contained in:
MaysWind
2025-06-08 02:47:10 +08:00
parent ce4bca8272
commit 8616183660
2 changed files with 22 additions and 0 deletions
+11
View File
@@ -179,6 +179,17 @@ build_frontend() {
fi
fi
if [ "$NO_TEST" = "0" ]; then
echo "Executing frontend unit testing..."
npm run test
if [ "$?" != "0" ]; then
echo_red "Error: Failed to pass unit testing"
exit 1
fi
fi
echo "Building frontend files ($RELEASE_TYPE)..."
if [ "$RELEASE" = "0" ]; then