54 lines
1.1 KiB
Bash
54 lines
1.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Define paths and variables
|
|
CONTRACTS_DIR="contracts"
|
|
FRONTEND_DIR="frontend"
|
|
TESTS_DIR="tests"
|
|
MOVE_COMPILER="move"
|
|
FRONTEND_SCRIPT="npm"
|
|
|
|
# Function to run Move contract tests
|
|
run_contract_tests() {
|
|
echo "Running Move contract tests..."
|
|
|
|
# Navigate to contracts directory
|
|
cd $CONTRACTS_DIR
|
|
|
|
# Run Move contract tests using the Move compiler or testing framework
|
|
# Replace with your actual test command for Move contracts
|
|
# Example:
|
|
# $MOVE_COMPILER test tests/*.move
|
|
|
|
echo "Move contract tests completed."
|
|
}
|
|
|
|
# Function to run frontend tests
|
|
run_frontend_tests() {
|
|
echo "Running frontend tests..."
|
|
|
|
# Navigate to frontend directory
|
|
cd $FRONTEND_DIR
|
|
|
|
# Install frontend dependencies
|
|
$FRONTEND_SCRIPT install
|
|
|
|
# Run frontend tests using your preferred testing framework (e.g., Jest, Mocha)
|
|
# Replace with your actual test command for frontend
|
|
# Example:
|
|
# $FRONTEND_SCRIPT test
|
|
|
|
echo "Frontend tests completed."
|
|
}
|
|
|
|
# Main script execution starts here
|
|
echo "Starting tests..."
|
|
|
|
# Run Move contract tests
|
|
run_contract_tests
|
|
|
|
# Run frontend tests
|
|
run_frontend_tests
|
|
|
|
# Exit script
|
|
exit 0
|