(minVersion: number)
| 4 | |
| 5 | // eslint-disable-next-line @typescript-eslint/ban-types |
| 6 | export 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 | |
| 20 | export function clearGlobalScope() { |
| 21 | const carrier = getSentryCarrier(GLOBAL_OBJ); |
no outgoing calls
no test coverage detected