Skip to content

Conversation

@JakeChampion
Copy link
Contributor

@JakeChampion JakeChampion commented Oct 29, 2025

updating our existing edge function tests to run with both default (eszip2) and tarball bundling configurations using feature flag variants

This is easier to review with the github ignore whitespace diff view enabled -- https://github.com/netlify/build/pull/6745/files?w=1

@JakeChampion JakeChampion requested a review from a team as a code owner October 29, 2025 09:51
@JakeChampion JakeChampion requested review from Copilot and removed request for a team October 29, 2025 09:51
@github-actions
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the edge functions test suite to run all tests with multiple flag variants, specifically adding support for testing both default behavior and tarball generation. The changes enable comprehensive testing of the edge_bundler_generate_tarball feature flag.

Key changes:

  • Introduced a parameterized testing approach using FLAG_VARIANTS to run all tests with different flag configurations
  • Added assertBundlesExist helper to verify the correct bundle formats are generated based on the variant
  • Updated all test names to include the variant ID prefix (e.g., "default -" or "tarball -")

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/build/tests/edge_functions/tests.js Wrapped all edge function tests in a loop over FLAG_VARIANTS, added bundle format assertions, and improved test cleanup with try-finally blocks
packages/build/tests/edge_functions/snapshots/tests.js.snap Binary snapshot file updated with new test outputs for both default and tarball variants
packages/build/tests/edge_functions/snapshots/tests.js.md Human-readable snapshots updated to include both default and tarball variant outputs for all tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

eduardoboucas
eduardoboucas previously approved these changes Oct 29, 2025
Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

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

Neat!

@JakeChampion JakeChampion force-pushed the jake/build branch 4 times, most recently from e79b1ed to 082ea16 Compare October 30, 2025 08:19
@JakeChampion JakeChampion marked this pull request as draft October 30, 2025 08:19
@JakeChampion JakeChampion force-pushed the jake/build branch 6 times, most recently from f5c7556 to 9897380 Compare October 30, 2025 09:55
updating our existing edge function tests to run with both default (eszip2) and tarball
bundling configurations using feature flag variants
@JakeChampion JakeChampion marked this pull request as ready for review October 30, 2025 10:16
@JakeChampion JakeChampion enabled auto-merge (squash) October 30, 2025 10:25
@JakeChampion JakeChampion merged commit 048a795 into main Oct 30, 2025
66 of 67 checks passed
@JakeChampion JakeChampion deleted the jake/build branch October 30, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants