Skip to content

Add generated.json with fixture contents from passing tests #1

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pyramation
Copy link
Contributor

@pyramation pyramation commented Jun 30, 2025

Add legacy-13.zip with SQL files from passing tests

Summary

Extended the fixture extraction to include both JSON mapping and physical SQL files. Added a legacy-13.zip archive containing copies of all 110 SQL files from passing tests in kitchen-sink.test.ts, maintaining the original directory structure from __fixtures__/.

Key additions:

  • legacy-13/ folder with 110 SQL files organized by category (alter/, upstream/, tables/, etc.)
  • legacy-13.zip compressed archive (79KB) for easy distribution
  • create-legacy-zip.js script that reads generated.json and copies corresponding fixture files
  • All files correspond exactly to those in generated.json (no xit/skipped tests included)

Review & Testing Checklist for Human

  • Verify parsing accuracy: Manually check 5-10 test entries in kitchen-sink.test.ts to confirm the script correctly identifies passing (it()) vs skipped (xit()) tests
  • Spot-check file integrity: Compare 3-5 files between __fixtures__/ and legacy-13/ to ensure content matches exactly
  • Confirm directory structure: Verify that legacy-13/ maintains the same folder organization as __fixtures__/ (e.g., upstream/, alter/, tables/)
  • Test exclusion logic: Search for any fixture paths in legacy-13/ that correspond to xit() tests to ensure they were properly excluded
  • Validate file count: Confirm that legacy-13/ contains exactly 110 files as reported by the script

Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    TestFile["packages/deparser/__tests__/kitchen-sink.test.ts"]:::context
    GeneratedJSON["generated.json"]:::context
    Script1["generate-fixtures.js"]:::context
    Script2["create-legacy-zip.js"]:::major-edit
    FixturesDir["__fixtures__/ (110+ .sql files)"]:::context
    LegacyDir["legacy-13/ (110 .sql files)"]:::major-edit
    ZipFile["legacy-13.zip"]:::major-edit
    
    TestFile --> Script1
    Script1 --> GeneratedJSON
    GeneratedJSON --> Script2
    FixturesDir --> Script2
    Script2 --> LegacyDir
    LegacyDir --> ZipFile
    
    Script2 --> CopyLogic["Copy files maintaining structure"]:::minor-edit
    Script2 --> ReadJSON["Read fixture paths from JSON"]:::minor-edit
    Script2 --> CreateDirs["Create directory structure"]:::minor-edit
    
    subgraph Legend
        L1["Major Edit"]:::major-edit
        L2["Minor Edit"]:::minor-edit    
        L3["Context/No Edit"]:::context
    end

classDef major-edit fill:#90EE90
classDef minor-edit fill:#87CEEB  
classDef context fill:#FFFFFF
Loading

Notes

  • Session info: Link to Devin run: https://app.devin.ai/sessions/437c8737336a471f911fd2b8cd9becac, requested by @pyramation
  • File sizes: legacy-13.zip is 79KB compressed, legacy-13/ folder contains ~7,900 lines of SQL across 110 files
  • Reusable scripts: Both generation scripts can be re-run if the test file changes
  • No dependencies: Uses only Node.js built-in modules (fs, path)
  • Structure preserved: The legacy-13/ folder maintains the exact same directory structure as fixtures/ for easy navigation
  • Compression ratio: The zip file achieves good compression (79KB vs ~236KB uncompressed JSON equivalent)

- Parsed packages/deparser/__tests__/kitchen-sink.test.ts
- Extracted 110 fixture files from passing tests (excluding xit/commented tests)
- Generated JSON mapping fixture paths to SQL contents
- All fixture files successfully read from __fixtures__ directory

Co-Authored-By: Dan Lynch <[email protected]>
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 2 commits June 30, 2025 23:24
- Node.js script that parses kitchen-sink.test.ts
- Extracts fixture paths from passing tests only
- Reads fixture file contents and creates JSON mapping

Co-Authored-By: Dan Lynch <[email protected]>
- Created legacy-13/ folder with 110 SQL files from passing tests
- Maintained original directory structure from __fixtures__
- Generated legacy-13.zip archive for easy distribution
- Added create-legacy-zip.js script for reproducibility
- Files correspond exactly to those in generated.json (no xit/skipped tests)

Co-Authored-By: Dan Lynch <[email protected]>
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.

1 participant