Skip to content

test(app-it): fixtures for the Vite + React, SvelteKit, and Astro recipes - #24

Open
Firnschnee wants to merge 4 commits into
Christian-Katzmann:mainfrom
Firnschnee:feat/framework-recipe-fixtures
Open

test(app-it): fixtures for the Vite + React, SvelteKit, and Astro recipes#24
Firnschnee wants to merge 4 commits into
Christian-Katzmann:mainfrom
Firnschnee:feat/framework-recipe-fixtures

Conversation

@Firnschnee

@Firnschnee Firnschnee commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Backs the Vite + React, SvelteKit, and Astro recipes (added in #15) with the fixtures the recipe-governance rule requires (CONTRIBUTING.md: each recipe should land with its fixture).

Each is a build-assert fixture modeled on next-basic (detection + bundle assembly, no runtime; single-server runtime stays covered by vite-basic):

  • vite-react (port 41100) proves the Vite + React detection branch, which vite-basic's plain-Vite shape does not exercise.
  • sveltekit-basic (port 41110) proves SvelteKit detection.
  • astro-basic (port 41120) proves Astro detection (port 4321).

Each adds a tiny project shape under scripts/fixtures/<name>/ plus one section in scripts/test-fixtures.sh that asserts the config-file detection, the dev-script inventory, and the recipe line, then build + assert_bundle. The fixtures README table and CHANGELOG are updated.

The detection half was verified locally; the build/bundle assertions run on the macOS CI lane.

Closes #2, #3, #4.

Summary by Sourcery

Add new behavioral fixtures to validate Vite + React, SvelteKit, and Astro app-it recipes via detection and bundle assembly.

New Features:

  • Introduce vite-react fixture exercising the Vite + React recipe branch and bundle assembly.
  • Introduce sveltekit-basic fixture exercising SvelteKit recipe detection and bundle assembly.
  • Introduce astro-basic fixture exercising Astro recipe detection and bundle assembly.

Enhancements:

  • Extend test-fixtures.sh to run inspect.sh, build, and bundle assertions for the new vite-react, sveltekit-basic, and astro-basic fixtures.
  • Document the new fixtures in scripts/fixtures/README.md and note them in the Unreleased changelog entry as backing the new recipes.

@sourcery-ai

sourcery-ai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds build-assert fixtures and tests for the Vite + React, SvelteKit, and Astro dev-server recipes in app-it, including minimal fixture projects, test-fixture sections, and documentation updates.

Sequence diagram for new fixture flow in test-fixtures.sh

sequenceDiagram
    participant TestFixtures as test-fixtures.sh
    participant Fixture as vite-react_fixture
    participant Inspect as inspect.sh
    participant Build as desktop-build.sh
    participant AssertBundle as assert_bundle

    TestFixtures->>Fixture: select vite-react fixture
    TestFixtures->>Inspect: inspect.sh (vite-react)
    Inspect-->>TestFixtures: framework detection
    TestFixtures->>TestFixtures: assert config-file detection
    TestFixtures->>TestFixtures: assert dev-script inventory
    TestFixtures->>TestFixtures: assert recipe line
    TestFixtures->>Build: desktop-build.sh (vite-react)
    Build-->>TestFixtures: bundle artifacts
    TestFixtures->>AssertBundle: assert_bundle (vite-react)
    AssertBundle-->>TestFixtures: bundle assertions passed
Loading

File-Level Changes

Change Details Files
Add build-assert test sections for Vite + React, SvelteKit, and Astro fixtures to the fixture test suite.
  • Introduce three new sections in scripts/test-fixtures.sh to run inspect.sh against vite-react, sveltekit-basic, and astro-basic fixtures.
  • Assert correct detection signals for each framework (config file presence, dev script names, and recipe labels) and absence of hardcoded-port warnings where applicable.
  • Reuse the existing build + assert_bundle flow for each new fixture to verify bundle assembly.
scripts/test-fixtures.sh
Define minimal vite-react, sveltekit-basic, and astro-basic fixture projects for recipe detection.
  • Add package.json files for vite-react, sveltekit-basic, and astro-basic encoding just enough deps/scripts to trigger the intended recipe detection branches.
  • Add corresponding config files (vite.config.ts, svelte.config.js, astro.config.mjs) shaped to be detected by inspect.sh while remaining inert at runtime.
  • Introduce placeholder app-it.config.json files for each new fixture directory to align with existing fixture layout expectations.
scripts/fixtures/vite-react/package.json
scripts/fixtures/vite-react/vite.config.ts
scripts/fixtures/vite-react/app-it.config.json
scripts/fixtures/sveltekit-basic/package.json
scripts/fixtures/sveltekit-basic/svelte.config.js
scripts/fixtures/sveltekit-basic/app-it.config.json
scripts/fixtures/astro-basic/package.json
scripts/fixtures/astro-basic/astro.config.mjs
scripts/fixtures/astro-basic/app-it.config.json
Document the new fixtures and their purpose in the fixtures README and CHANGELOG. scripts/fixtures/README.md
CHANGELOG.md

Assessment against linked issues

Issue Objective Addressed Explanation
#2 Add an Astro dev-server recipe alongside existing framework recipes, including detection of Astro projects, dev command, port behavior, and any Astro-specific handling. The PR only adds fixtures and tests for an already-existing Astro recipe (noted as added in #15). It does not introduce or modify the Astro recipe itself or its detection/port logic.
#2 Test the Astro recipe against an Astro project shape to ensure correct detection and bundle assembly.
#2 Document Astro-specific details alongside other framework recipes (e.g., in recipes docs or similar developer-facing documentation). The PR updates the fixtures README and CHANGELOG to mention the Astro fixture and recipe, but it does not add or modify any primary recipe documentation describing Astro-specific behavior as requested in the issue.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

Add an Astro recipe

1 participant