Angular AI Test Generator for VS Code🚀 Generate robust Angular 20+ unit tests instantly using Azure OpenAI.This extension is specifically designed for modern Angular applications. It understands Standalone Components, Zoneless Change Detection, and Signals, ensuring the generated tests follow the latest best practices and architectural patterns. ✨ FeaturesAI-Powered Generation: Uses your Azure OpenAI instance to analyze code and write tests. Angular 20+ Ready: Fully supports Standalone Components (uses imports instead of declarations). Zoneless Support: Automatically includes provideZonelessChangeDetection() in TestBed providers. Signals: Knows how to test Signal Inputs, Outputs, and Computed values. Best Practices enforced: No Private Testing: Strictly tests public APIs only. Auto Mocking: Automatically generates jasmine.createSpyObj for dependencies. Extensible Architecture: Currently supports Components, with architecture ready for Services and Directives. 📋 RequirementsVS Code v1.80.0 or higher. An active Azure OpenAI resource (Endpoint & API Key). An Angular project (Designed for v17/18/19/20+). ⚙️ Extension Settings To use this extension, you must configure your Azure OpenAI credentials in VS Code Settings. 1 Open Settings (Ctrl+, or Cmd+,). 2 Search for Angular AI. 3 Fill in the following fields: Setting Description Example angularAiTestGen.azureEndpoint Your Azure OpenAI Resource Endpoint https://my-resource.openai.azure.com/ angularAiTestGen.apiKey Your Azure OpenAI API Key abc123xyz... angularAiTestGen.deploymentName The deployment name of your model (e.g., gpt-4o, gpt-35-turbo) gpt-4o angularAiTestGen.apiVersion API Version (Optional, defaults to 2023-05-15) 2023-05-15 Note: It is recommended to use GPT-4 or GPT-3.5-Turbo models for best code generation results. 🚀 UsageOpen a TypeScript file in your Angular project (currently supports .component.ts). Right-click anywhere in the editor. Select "Generate Angular Unit Test (AI)" from the context menu. Wait for the progress notification to finish. Review the generated .spec.ts file side-by-side with your code. Alternatively, you can use the Command Palette: Press Ctrl+Shift+P (or Cmd+Shift+P). Type Generate Angular Unit Test (AI) and hit Enter. 📝 Example Output For a Zoneless Standalone Component: ⚠️ Known LimitationsCurrently, only .component.ts files are officially supported via the context menu. Service and Directive generation logic is architected but not yet fully enabled in the UI (Coming Soon). 🛡️ Data PrivacyThis extension sends your code snippets to your own private Azure OpenAI instance. It does not send code to any third-party public servers or the extension author. 📄 LicenseMIT |