open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.54k stars 738 forks source link

[instrumentation] replace `cpx2` with a local module in `tests/fixtures/` exclusively for testing #4533

Open pichlermarc opened 3 months ago

pichlermarc commented 3 months ago

In @opentelemetry/instrumentation we test RequireInTheMiddleSingleton by using the cpx2 package. https://github.com/open-telemetry/opentelemetry-js/blob/63d74cdc366fc337be66c1a766a2cc8e5275a85a/experimental/packages/opentelemetry-instrumentation/test/node/RequireInTheMiddleSingleton.test.ts#L42-L43

As we don't use the cpx2 package anywhere else anymore, having a local test package would help us get rid of that dependency

To complete this issue we need to:


It looks like cpx2 is only used as a test package for RequireInTheMiddleSingleton, so picking some other module, or manually creating a local module in a fixtures/ subdir and using that directly would work as well. However, using cpx2 seems fine.

Originally posted by @trentm in https://github.com/open-telemetry/opentelemetry-js/pull/4510#pullrequestreview-1920997060

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.