Skip to content
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

test(nextjs): Catch type errors in next.config.ts #810

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Feb 21, 2025

Our NextJS e2e test used a next.config.mjs file which means when building the nextjs app, type errors in this file are not caught. This caused the bug fixed via #798 to slip through. So this PR makes the next config a typescript file which will throw a build error if a type mismatch (like adding an unsupported property to the Sentry build options) is detected.

#skip-changelog

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.55%. Comparing base (801fbe4) to head (51f4e4d).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #810      +/-   ##
==========================================
- Coverage   49.67%   49.55%   -0.12%     
==========================================
  Files          52       52              
  Lines        3503     3519      +16     
  Branches      825      825              
==========================================
+ Hits         1740     1744       +4     
+ Misses       1762     1639     -123     
- Partials        1      136     +135     
Flag Coverage Δ
e2e-tests 80.85% <ø> (-3.77%) ⬇️
unit-tests 48.25% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Lms24 Lms24 self-assigned this Feb 21, 2025
@Lms24
Copy link
Member Author

Lms24 commented Feb 25, 2025

hmm crap, next config TS only works with Next 15. I don't think we want to stop testing against Next 14 though, so we probably need to create a second e2e test app with Next 15. I'll try to slot this in when I have a spare cycle but can't spend too much time on this right now.

@Lms24 Lms24 marked this pull request as draft February 25, 2025 10:29
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.

2 participants