File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/node-integration-tests/suites/public-api/LocalVariables Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
import type { Event } from '@sentry/node' ;
2
2
import * as childProcess from 'child_process' ;
3
3
import * as path from 'path' ;
4
+ import { parseSemver } from '@sentry/utils' ;
5
+
6
+ const nodeMajor = parseSemver ( process . version ) . major || 1 ;
4
7
5
8
describe ( 'LocalVariables integration' , ( ) => {
6
9
test ( 'Should not include local variables by default' , done => {
@@ -56,8 +59,9 @@ describe('LocalVariables integration', () => {
56
59
expect . assertions ( 4 ) ;
57
60
58
61
const testScriptPath = path . resolve ( __dirname , 'local-variables-caught.mjs' ) ;
62
+ const arg = nodeMajor < 12 ? '--experimental-modules' : '' ;
59
63
60
- childProcess . exec ( `node ${ testScriptPath } ` , { encoding : 'utf8' } , ( _ , stdout ) => {
64
+ childProcess . exec ( `node ${ arg } ${ testScriptPath } ` , { encoding : 'utf8' } , ( _ , stdout ) => {
61
65
const event = JSON . parse ( stdout ) as Event ;
62
66
63
67
const frames = event . exception ?. values ?. [ 0 ] . stacktrace ?. frames || [ ] ;
You can’t perform that action at this time.
0 commit comments