do unit test when building frontend files
This commit is contained in:
@@ -191,6 +191,17 @@ goto :pre_parse_args
|
||||
)
|
||||
)
|
||||
|
||||
if "%NO_TEST%"=="0" (
|
||||
echo Executing frontend unit testing...
|
||||
|
||||
call npm run test
|
||||
|
||||
if !errorlevel! neq 0 (
|
||||
call :echo_red "Error: Failed to pass unit testing"
|
||||
goto :end
|
||||
)
|
||||
)
|
||||
|
||||
endlocal
|
||||
|
||||
echo Building frontend files(%RELEASE_TYPE%)...
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user