Commit Graph

2 Commits

Author SHA1 Message Date
snomiao
9ed91c197f [test] Improve shimFiles.test.ts to work with standard dist folder
- Use standard `dist` folder instead of hardcoded `dist-treeshake-*` paths
- Add fallback logic to check multiple dist directory candidates
- Remove local-only comparison test between treeshake-enabled/disabled builds
- Add helper test to verify dist directory is found

This ensures tests work in CI/CD environments where only the standard
`dist` folder exists, while still supporting local debugging builds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 00:55:15 +00:00
snomiao
5216c0da9f [test] Add comprehensive shim files export tests
Added unit tests to verify that treeshaking doesn't break the public API exposed through shim files in the dist folder. Tests check:
- All core shim files exist (api.js, app.js, changeTracker.js, etc.)
- Each shim file contains proper exports from window.comfyAPI
- UI subdirectory shim files are present and valid
- Metadata subdirectory shim files are present and valid
- Treeshake-enabled and treeshake-disabled builds have identical shim files

This ensures backward compatibility when treeshaking is enabled and prevents breaking changes to the extension API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 15:34:11 +00:00