#!/bin/bash

echo "Running NLP Unit Tests..."
echo "========================="

# Run unit tests for NLP services
npm test -- tests/services/nlp/ --silent

echo -e "\n\nRunning NLP Integration Tests..."
echo "================================="

# Run integration tests for NLP API
npm test -- tests/api/nlp.integration.test.ts --silent

echo -e "\n\nTest Summary"
echo "============"
echo "✅ Unit tests for NLP services created:"
echo "   - tests/services/nlp/nlp.service.test.ts"
echo "   - tests/services/nlp/entity-extractor.service.test.ts"  
echo "   - tests/services/nlp/task-classifier.service.test.ts"
echo ""
echo "✅ Integration tests for NLP API created:"
echo "   - tests/api/nlp.integration.test.ts"
echo ""
echo "📊 Coverage targets:"
echo "   - Unit tests: 80% coverage for NLP components"
echo "   - Integration tests: End-to-end NLP pipeline validation"
echo ""
echo "🎯 Test scenarios covered:"
echo "   - Text parsing and tokenization"
echo "   - Entity extraction (titles, deadlines, assignees, etc.)"
echo "   - Task classification (type, priority, urgency)"
echo "   - Multi-language support (8 languages)"
echo "   - Translation services"
echo "   - Caching and performance"
echo "   - Error handling and validation"
echo "   - API endpoint authentication and rate limiting"