Skip to content

chore(gen2-migration): some QoL improvements#14732

Merged
iliapolo merged 2 commits intogen2-migrationfrom
epolon/small-fixes
Apr 1, 2026
Merged

chore(gen2-migration): some QoL improvements#14732
iliapolo merged 2 commits intogen2-migrationfrom
epolon/small-fixes

Conversation

@iliapolo
Copy link
Copy Markdown
Contributor

@iliapolo iliapolo commented Apr 1, 2026

Description of changes

Two small fixes to the snapshot test framework:

  1. README path corrections — The migration-apps README referenced old test
    file paths (command-handlers.test.ts, refactor.test.ts under nested dirs)
    that were renamed in a previous PR. Updated all references to the current
    generate.test.ts and refactor.test.ts at the top-level test directory.
    Also added a note about the two-pass snapshot update behavior (first run
    writes updated files but still reports failure; second run confirms).

  2. Snapshot.compare cleanup — Removed the .actual.* copy side effect from
    compare(). This was copying the actual output into the repo on every
    comparison, which cluttered the working tree. The diff report already
    contains everything needed for debugging.

  3. Snapshot.update fix — Added node_modules to the ignore patterns when
    copying actual output into the expected snapshot directory. Without this,
    node_modules from the temp dir would get copied into the snapshot,
    bloating the repo. Added a completion log line for visibility.

Issue #, if available

N/A

Description of how you validated changes

Built the amplify-cli package successfully (yarn build).

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Update migration-apps README to reference renamed test files
(generate.test.ts, refactor.test.ts), simplify snapshot update
commands, and add a note about the two-pass update behavior.

Remove the .actual.* copy side effect from Snapshot.compare() and
add node_modules ignore pattern to Snapshot.update(). Add a
completion log line to update().
---
Prompt: commit what i did
@iliapolo iliapolo requested a review from a team as a code owner April 1, 2026 01:57
@iliapolo iliapolo changed the base branch from dev to gen2-migration April 1, 2026 01:58
@iliapolo iliapolo enabled auto-merge (squash) April 1, 2026 02:04
Comment thread amplify-migration-apps/README.md
@iliapolo iliapolo merged commit eab9036 into gen2-migration Apr 1, 2026
4 checks passed
@iliapolo iliapolo deleted the epolon/small-fixes branch April 1, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants