 aacb45156b
			
		
	
	aacb45156b
	
	
	
		
			
			- Install Jest for unit testing with React Testing Library - Install Playwright for end-to-end testing - Configure Jest with proper TypeScript support and module mapping - Create test setup files and utilities for both unit and e2e tests Components: * Jest configuration with coverage thresholds * Playwright configuration with browser automation * Unit tests for LoginForm, AuthContext, and useSocketIO hook * E2E tests for authentication, dashboard, and agents workflows * GitHub Actions workflow for automated testing * Mock data and API utilities for consistent testing * Test documentation with best practices Testing features: - Unit tests with 70% coverage threshold - E2E tests with API mocking and user journey testing - CI/CD integration for automated test runs - Cross-browser testing support with Playwright - Authentication system testing end-to-end 🚀 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			40 lines
		
	
	
		
			919 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			919 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: Tests
 | |
| 
 | |
| on: [push, pull_request]
 | |
| 
 | |
| env:
 | |
|   FORCE_COLOR: 2
 | |
| 
 | |
| jobs:
 | |
|   run:
 | |
|     name: Node ${{ matrix.node }} on ${{ matrix.os }}
 | |
|     runs-on: ${{ matrix.os }}
 | |
| 
 | |
|     strategy:
 | |
|       fail-fast: false
 | |
|       matrix:
 | |
|         node: [20]
 | |
|         os: [ubuntu-latest, windows-latest]
 | |
| 
 | |
|     steps:
 | |
|       - name: Clone repository
 | |
|         uses: actions/checkout@v3
 | |
| 
 | |
|       - name: Set up Node.js
 | |
|         uses: actions/setup-node@v3
 | |
|         with:
 | |
|           node-version: ${{ matrix.node }}
 | |
| 
 | |
|       - name: Install npm dependencies
 | |
|         run: npm i
 | |
| 
 | |
|       - name: Run tests
 | |
|         run: npm test
 | |
| 
 | |
|       # We test multiple Windows shells because of prior stdout buffering issues
 | |
|       # filed against Grunt. https://github.com/joyent/node/issues/3584
 | |
|       - name: Run PowerShell tests
 | |
|         run: "npm test # PowerShell" # Pass comment to PS for easier debugging
 | |
|         shell: powershell
 | |
|         if: startsWith(matrix.os, 'windows')
 |