opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

chore: add testing with Node.js 23

Open trentm opened this issue 9 months ago • 2 comments
trafficstars

This was challenging because Node.js v23.6.0 enabled type-stripping by default, which means node will attempt to execute .ts files by default. This is incompatible with the .ts handling being used for running tests (which was indirectly using ts-node for this via .mocharc.yml).

Instead, tests are now run by first compiling the test/** typescript files to build/test/**, then executing them from there. This required updating some relative paths to test files that were not compiled (like .js fixtures, etc.).

Note: I didn't need to change any runtime code.

Refs: https://github.com/open-telemetry/opentelemetry-js/issues/5415 (this is option 1)

trentm avatar Jan 30 '25 23:01 trentm