- 
                Notifications
    You must be signed in to change notification settings 
- Fork 79
chore: add more test coverage for edge function tarball bundling #6745
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
Conversation
| This pull request adds or modifies JavaScript ( | 
ba1adb4    to
    f408b0b      
    Compare
  
    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.
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_VARIANTSto run all tests with different flag configurations
- Added assertBundlesExisthelper 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.
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.
Neat!
e79b1ed    to
    082ea16      
    Compare
  
    f5c7556    to
    9897380      
    Compare
  
    updating our existing edge function tests to run with both default (eszip2) and tarball bundling configurations using feature flag variants
9897380    to
    8310892      
    Compare
  
    
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