Skip to content

test(e2e): Add tsx + express e2e test app #16578

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 3 commits into from
Aug 5, 2025
Merged

test(e2e): Add tsx + express e2e test app #16578

merged 3 commits into from
Aug 5, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jun 13, 2025

In light of #16575, this PR adds an e2e test app for running an express app via tsx instead of transpiling it and running it with node directly. I basically just copied the app and tests from our node-express e2e app, so it also contains tests for TRPC and MCP stuff. If reviewers prefer, I can remove the additional stuff but I think it actually makes sense to test a "loaded" express app with additional instrumentation.

Importantly, I had to --import the instrument file because TSX seems to internally transpile to ESM by default.

@Lms24 Lms24 self-assigned this Jun 13, 2025
@Lms24 Lms24 requested review from mydea, a team and AbhiPrasad and removed request for a team June 13, 2025 09:13
@mydea
Copy link
Member

mydea commented Jun 16, 2025

hmm, local variables seem to not work, at least the test is failing? 🤔

@Lms24 Lms24 force-pushed the lms/test-e2e-tsx branch from 50cc37d to b6ce670 Compare August 4, 2025 10:31
@Lms24
Copy link
Member Author

Lms24 commented Aug 4, 2025

woah completely forgot that this still exists. Re-running the tests for now. If localvariables still don't work, I think this is likely a limitation of tsx and something we can accept for the moment.

@Lms24
Copy link
Member Author

Lms24 commented Aug 4, 2025

Update:

  • Updated test since some of the assertions were quite outdated by now
  • removed the LocalVariables test since I didn't get any local vars
  • Rebased and good for another round of reviews

@Lms24 Lms24 requested review from a team, chargome and RulaKhaled and removed request for a team August 5, 2025 09:35
Copy link
Member

@RulaKhaled RulaKhaled left a comment

Choose a reason for hiding this comment

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

lgtm!

@Lms24 Lms24 merged commit d02c59a into develop Aug 5, 2025
184 checks passed
@Lms24 Lms24 deleted the lms/test-e2e-tsx branch August 5, 2025 12:39
RulaKhaled pushed a commit that referenced this pull request Aug 7, 2025
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.

3 participants