Skip to content

Commit e325cc8

Browse files
committed
Pass --experimental-modules in node v10
1 parent 8795250 commit e325cc8

File tree

1 file changed

+5
-1
lines changed
  • packages/node-integration-tests/suites/public-api/LocalVariables

1 file changed

+5
-1
lines changed

packages/node-integration-tests/suites/public-api/LocalVariables/test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import type { Event } from '@sentry/node';
2+
import { parseSemver } from '@sentry/utils';
23
import * as childProcess from 'child_process';
34
import * as path from 'path';
45

6+
const nodeMajor = parseSemver(process.version).major || 1;
7+
58
describe('LocalVariables integration', () => {
69
test('Should not include local variables by default', done => {
710
expect.assertions(2);
@@ -56,8 +59,9 @@ describe('LocalVariables integration', () => {
5659
expect.assertions(4);
5760

5861
const testScriptPath = path.resolve(__dirname, 'local-variables-caught.mjs');
62+
const arg = nodeMajor < 12 ? '--experimental-modules' : '';
5963

60-
childProcess.exec(`node ${testScriptPath}`, { encoding: 'utf8' }, (_, stdout) => {
64+
childProcess.exec(`node ${arg} ${testScriptPath}`, { encoding: 'utf8' }, (_, stdout) => {
6165
const event = JSON.parse(stdout) as Event;
6266

6367
const frames = event.exception?.values?.[0].stacktrace?.frames || [];

0 commit comments

Comments
 (0)