sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

test(e2e): Add `tsx` + `express` e2e test app

Open Lms24 opened this issue 7 months ago • 1 comments

In light of https://github.com/getsentry/sentry-javascript/issues/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 avatar Jun 13 '25 09:06 Lms24

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

mydea avatar Jun 16 '25 08:06 mydea

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 avatar Aug 04 '25 10:08 Lms24

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 avatar Aug 04 '25 12:08 Lms24