MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / testOnlyIfNodeVersionAtLeast

Function testOnlyIfNodeVersionAtLeast

packages/core/test/testutils.ts:6–18  ·  view source on GitHub ↗
(minVersion: number)

Source from the content-addressed store, hash-verified

4
5// eslint-disable-next-line @typescript-eslint/ban-types
6export const testOnlyIfNodeVersionAtLeast = (minVersion: number): Function => {
7 const currentNodeVersion = process.env.NODE_VERSION;
8
9 try {
10 if (Number(currentNodeVersion?.split('.')[0]) < minVersion) {
11 return it.skip;
12 }
13 } catch {
14 // we can't tell, so err on the side of running the test
15 }
16
17 return it;
18};
19
20export function clearGlobalScope() {
21 const carrier = getSentryCarrier(GLOBAL_OBJ);

Callers 2

is.test.tsFile · 0.90
object.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected