Skip to content

Commit fb154c9

Browse files
committed
Add filename and release to replaced keys.
1 parent 7341ff6 commit fb154c9

File tree

2 files changed

+12
-10
lines changed
  • packages/node-integration-tests

2 files changed

+12
-10
lines changed

packages/node-integration-tests/suites/send-event/capture-exception/__snapshots__/test.ts.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Object {
1818
"colno": 75,
1919
"context_line": " step((generator = generator.apply(thisArg, _arguments || [])).next());
2020
",
21-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/node_modules/tslib/tslib.js",
21+
"filename": Any<String>,
2222
"function": "undefined.<anonymous>",
2323
"in_app": false,
2424
"lineno": 115,
@@ -59,7 +59,7 @@ Object {
5959
"colno": 57,
6060
"context_line": " function verb(n) { return function (v) { return step([n, v]); }; }
6161
",
62-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/node_modules/tslib/tslib.js",
62+
"filename": Any<String>,
6363
"function": "Object.next",
6464
"in_app": false,
6565
"lineno": 122,
@@ -99,7 +99,7 @@ Object {
9999
"colno": 27,
100100
"context_line": " op = body.call(thisArg, _);
101101
",
102-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/node_modules/tslib/tslib.js",
102+
"filename": Any<String>,
103103
"function": "step",
104104
"in_app": false,
105105
"lineno": 141,
@@ -140,10 +140,10 @@ Object {
140140
Object {
141141
"colno": 7,
142142
"context_line": " require(\`\${testDir}/subject\`);",
143-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/packages/node-integration-tests/utils/index.ts",
143+
"filename": Any<String>,
144144
"function": "Object.<anonymous>",
145145
"in_app": true,
146-
"lineno": 79,
146+
"lineno": 81,
147147
"module": "index.ts",
148148
"post_context": Array [
149149
"",
@@ -167,7 +167,7 @@ Object {
167167
Object {
168168
"colno": 21,
169169
"context_line": " return this.requireModule(from, moduleName);",
170-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/node_modules/jest-runtime/build/index.js",
170+
"filename": Any<String>,
171171
"function": "Runtime.requireModuleOrMock",
172172
"in_app": false,
173173
"lineno": 598,
@@ -194,7 +194,7 @@ Object {
194194
Object {
195195
"colno": 10,
196196
"context_line": " this._loadModule(",
197-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/node_modules/jest-runtime/build/index.js",
197+
"filename": Any<String>,
198198
"function": "Runtime.requireModule",
199199
"in_app": false,
200200
"lineno": 433,
@@ -221,7 +221,7 @@ Object {
221221
Object {
222222
"colno": 12,
223223
"context_line": " this._execModule(localModule, options, moduleRegistry, fromPath);",
224-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/node_modules/jest-runtime/build/index.js",
224+
"filename": Any<String>,
225225
"function": "Runtime._loadModule",
226226
"in_app": false,
227227
"lineno": 577,
@@ -248,7 +248,7 @@ Object {
248248
Object {
249249
"colno": 68,
250250
"context_line": " runScript[_transform().ScriptTransformer.EVAL_RESULT_VARIABLE].call(",
251-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/node_modules/jest-runtime/build/index.js",
251+
"filename": Any<String>,
252252
"function": "Runtime._execModule",
253253
"in_app": false,
254254
"lineno": 867,
@@ -275,7 +275,7 @@ Object {
275275
Object {
276276
"colno": 8,
277277
"context_line": "Sentry.captureException('Error');",
278-
"filename": "/Users/onurtemizkan/Projects/sentry-javascript/packages/node-integration-tests/suites/send-event/capture-exception/subject.ts",
278+
"filename": Any<String>,
279279
"function": "Object.<anonymous>",
280280
"in_app": true,
281281
"lineno": 3,

packages/node-integration-tests/utils/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { getPortPromise } from 'portfinder';
88
const keysToReplace = {
99
timestamp: expect.any(Number),
1010
event_id: expect.any(String),
11+
filename: expect.any(String),
12+
release: expect.any(String),
1113
};
1214

1315
const deepReplace = (obj: Record<string, any>, keyName: string, replacer: (from: any) => string): void => {

0 commit comments

Comments
 (0)