-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·41 lines (31 loc) · 925 Bytes
/
init.sh
File metadata and controls
executable file
·41 lines (31 loc) · 925 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# GPT Exporter Test Runner
# Runs the markdown export tests for frontmatter modifications
set -e
echo "=================================="
echo "GPT Exporter - Frontmatter Tests"
echo "=================================="
echo ""
# Check Node.js version
NODE_VERSION=$(node -v 2>/dev/null | cut -d'v' -f2 | cut -d'.' -f1)
if [ -z "$NODE_VERSION" ] || [ "$NODE_VERSION" -lt 18 ]; then
echo "Error: Node.js 18+ is required"
echo "Current version: $(node -v 2>/dev/null || echo 'not installed')"
exit 1
fi
echo "Node.js version: $(node -v)"
echo ""
# Run tests
echo "Running tests..."
echo ""
node test/runner.mjs "$@"
TEST_EXIT_CODE=$?
echo ""
echo "=================================="
if [ $TEST_EXIT_CODE -eq 0 ]; then
echo "All tests completed successfully!"
else
echo "Some tests failed. Exit code: $TEST_EXIT_CODE"
fi
echo "=================================="
exit $TEST_EXIT_CODE