Skip to content

chore: fix tests that rely on split route snapshots #2224

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

Merged
merged 6 commits into from
Jul 21, 2023

Conversation

MarcL
Copy link
Contributor

@MarcL MarcL commented Jul 21, 2023

Description

When running the unit tests with npm run build:demo && npm run test:jest, they would fail locally if you haven't run netlify serve to generate the redirects.

This PR adds additional tests with the NEXT_SPLIT_API_ROUTES environment variable enabled and disabled to capture the different redirect generation behaviour.

Tests

See changes for the additional tests.

You can test this change yourself like so:

  1. npm run build:demo && npm run test:jest

Relevant links (GitHub issues, etc.) or a picture of cute animal

image

@MarcL MarcL requested a review from a team as a code owner July 21, 2023 11:17
@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/64ba85d4983bf000084e9b29
😎 Deploy Preview https://deploy-preview-2224--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/64ba85d4748cbe0008a942b4
😎 Deploy Preview https://deploy-preview-2224--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label Jul 21, 2023
@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit e4c3c2f
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/64ba69329585430008756711
😎 Deploy Preview https://deploy-preview-2224--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit e4c3c2f
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/64ba6932dc348200081e5fb4
😎 Deploy Preview https://deploy-preview-2224--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit e4c3c2f
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/64ba6932c25cc80008ae04ae
😎 Deploy Preview https://deploy-preview-2224--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit e4c3c2f
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/64ba69321c9bd70008d2fd80
😎 Deploy Preview https://deploy-preview-2224--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit e4c3c2f
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/64ba6932eeb2fa00093072b6
😎 Deploy Preview https://deploy-preview-2224--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit e4c3c2f
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/64ba6932c50a7e0009527db2
😎 Deploy Preview https://deploy-preview-2224--next-plugin-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit e4c3c2f
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/64ba6932dc54770008e90793
😎 Deploy Preview https://deploy-preview-2224--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/64ba85d51639b90008cbf1ad
😎 Deploy Preview https://deploy-preview-2224--next-plugin-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/64ba85d44f2fd80008817ae4
😎 Deploy Preview https://deploy-preview-2224--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/64ba85d4d27f9b0008bd758d
😎 Deploy Preview https://deploy-preview-2224--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/64ba85d4dae8790009b83adb
😎 Deploy Preview https://deploy-preview-2224--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/64ba85d42ea91000083b2ff8
😎 Deploy Preview https://deploy-preview-2224--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/64ba85d47e9d2200083f3ef1
😎 Deploy Preview https://deploy-preview-2224--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 21, 2023

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit 4154eec
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/64ba85d4a166280008582d69
😎 Deploy Preview https://deploy-preview-2224--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@MarcL MarcL mentioned this pull request Jul 21, 2023
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

Thank you!

@pieh pieh added the automerge label Jul 21, 2023
@kodiakhq kodiakhq bot merged commit 93704a1 into main Jul 21, 2023
@kodiakhq kodiakhq bot deleted the marcl/fix-split-route-tests branch July 21, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants