-
-
Notifications
You must be signed in to change notification settings - Fork 0
test(e2e): implement generator option scenarios for move-file #341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
LayZeeDK
merged 8 commits into
test/319-adopt-new-end-to-end-test-plan
from
claude/issue-322-20251101-1938
Nov 1, 2025
Merged
test(e2e): implement generator option scenarios for move-file #341
LayZeeDK
merged 8 commits into
test/319-adopt-new-end-to-end-test-plan
from
claude/issue-322-20251101-1938
Nov 1, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add comprehensive test coverage for all move-file generator options: - MOVE-PROJECT-DIR: Tests projectDirectory option for explicit path - MOVE-DERIVE-DIR: Tests deriveProjectDirectory and mutual exclusivity - MOVE-SKIP-EXPORT: Tests skipExport to prevent index updates - MOVE-SKIP-FORMAT: Tests skipFormat to preserve formatting - MOVE-UNICODE: Tests allowUnicode for Unicode filenames - MOVE-REMOVE-EMPTY: Tests removeEmptyProject cleanup behavior Each scenario includes focused assertions to verify critical invariants such as file relocation, import/export rewrite behavior, and project removal where applicable. Closes #322 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Lars Gyrup Brink Nielsen <[email protected]>
LayZeeDK
commented
Nov 1, 2025
Refactor generator option scenarios to follow the new cost-efficient end-to-end test plan architecture: - Move tests from workspace.spec.ts to workspace.suite.spec.ts - Implement 6 generator option scenarios using shared workspace pattern - Use pre-allocated libraries (lib-d through lib-o) to avoid setup overhead - Follow existing patterns with infrastructure fast-fail and inline assertions Scenarios implemented: - MOVE-PROJECT-DIR: projectDirectory option for explicit paths - MOVE-DERIVE-DIR: deriveProjectDirectory flag - MOVE-SKIP-EXPORT: skipExport to prevent index updates - MOVE-SKIP-FORMAT: skipFormat to preserve unformatted code - MOVE-UNICODE: allowUnicode for Unicode filenames - MOVE-REMOVE-EMPTY: removeEmptyProject cleanup behavior Related to #322 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Lars Gyrup Brink Nielsen <[email protected]>
…sue-322-20251101-1938
LayZeeDK
commented
Nov 1, 2025
Replace all error-throwing patterns (if-throw) with Jest expect assertions for better test reporting and consistency: - existsSync checks: expect(existsSync(...)).toBe(true/false) - String content checks: expect(content).toContain(...) / not.toContain(...) - Defined checks: expect(value).toBeDefined() Updated 8 generator option scenarios with 21 total assertions. Co-authored-by: Lars Gyrup Brink Nielsen <[email protected]>
This comment was marked as duplicate.
This comment was marked as duplicate.
Create `toExistOnFilesystem()` custom matcher to provide better error messages when asserting file existence in e2e tests. Benefits: - Clear error messages showing exact path and existence status - More readable assertions: expect(path).toExistOnFilesystem() - Follows Jest best practices for custom matchers Replaced 5 existsSync assertions across MOVE-SMALL, APP-TO-LIB, and MOVE-REMOVE-EMPTY scenarios. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Lars Gyrup Brink Nielsen <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Add explicit type narrowing guards after expect assertions to resolve TS18048 errors where sharedWorkspace is possibly undefined. This ensures TypeScript correctly infers the non-null type after the Jest assertion. Co-authored-by: Lars Gyrup Brink Nielsen <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Add explicit type guard after expect(appName).toBeDefined() to narrow the type from string | undefined to string, resolving TypeScript errors at lines 452 and 457. Co-authored-by: Lars Gyrup Brink Nielsen <[email protected]>
LayZeeDK
commented
Nov 1, 2025
Replace expect().toBeDefined() + if (!value) return; pattern with custom assertDefined<T>() function using TypeScript's asserts keyword. Benefits: - Single line instead of two - Better error messages with value name - Type narrowing via assertion signature - More idiomatic TypeScript Co-authored-by: Lars Gyrup Brink Nielsen <[email protected]>
LayZeeDK
commented
Nov 1, 2025
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ LGTM
f9aea3b
into
test/319-adopt-new-end-to-end-test-plan
14 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add comprehensive test coverage for all move-file generator options:
Each scenario includes focused assertions to verify critical invariants such as file relocation, import/export rewrite behavior, and project removal where applicable.
Closes #322
🤖 Generated with Claude Code