mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
When generating tests for class methods (e.g., ModulesContainer.getById), the test generator was incorrectly assuming default import style, generating: import ModulesContainer from '...' This caused "Cannot find module" errors when: 1. The class was not exported at all 2. The class used named export (export class X) instead of default export This fix: - Adds _detect_export_style() to parse source code and detect actual export style - Modifies _resolve_import() to use detected export style: - 'export default class X' → default import - 'export class X' → named import - No export → named import (test will fail, surfacing the issue) - Adds comprehensive unit tests for all scenarios Affected traces: 12332328-80e8-4bde-bdd6-c76ac373675a, 73ccd4c6-a4f7-467a-8356-5199e9d9b877, 989dcbda-bc27-40b7-aed0-0ab51fd00e6d, and others with ERR_MODULE_NOT_FOUND Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| aiservice | ||
| .dockerignore | ||