-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_unit.sh
More file actions
executable file
·29 lines (23 loc) · 1.07 KB
/
Copy pathtest_unit.sh
File metadata and controls
executable file
·29 lines (23 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
# ==============================================================================
# Rexone Mobile — Unit Test Runner (Flutter Test)
#
# Usage:
# ./scripts/test_unit.sh [file|filter] [options]
#
# Examples:
# ./scripts/test_unit.sh # Run all unit tests
# ./scripts/test_unit.sh test/controllers/ # Run all controller tests
# ./scripts/test_unit.sh test/controllers/socket_controller_test.dart
# ./scripts/test_unit.sh --coverage # Run with code coverage
# ==============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$PROJECT_ROOT"
# Add Dart / Flutter pub cache to PATH if present
export PATH="$PATH:$HOME/.pub-cache/bin:${PUB_CACHE:-$HOME/.pub-cache}/bin"
echo "===================================================="
echo " ⚡ Rexone Mobile — Unit Tests (Flutter Test)"
echo "===================================================="
flutter test "$@"