Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(core): Pre-beforeSendTransaction cleanup #6135

Merged
merged 10 commits into from Nov 4, 2022
18 changes: 3 additions & 15 deletions packages/core/test/lib/base.test.ts
Expand Up @@ -1097,19 +1097,7 @@ describe('BaseClient', () => {
const client = new TestClient(options);

const transaction: Event = {
contexts: {
trace: {
op: 'pageload',
span_id: 'a3df84a60c2e4e76',
trace_id: '86f39e84263a4de99c326acab3bfe3bd',
},
},
environment: 'production',
event_id: '972f45b826a248bba98e990878a177e1',
spans: [],
start_timestamp: 1591603196.614865,
timestamp: 1591603196.728485,
Comment on lines -1098 to -1109
Copy link
Member

@Lms24 Lms24 Nov 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is just stuff we didn't need for the test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. It has nothing to do with the name-change data we're testing, so in the end it's just noise.

transaction: 'initialName',
transaction: '/dogs/are/great',
type: 'transaction',
transaction_info: {
source: 'url',
Expand All @@ -1120,12 +1108,12 @@ describe('BaseClient', () => {

const scope = new Scope();
scope.addEventProcessor(event => {
event.transaction = 'updatedName';
event.transaction = '/adopt/dont/shop';
return event;
});

client.captureEvent(transaction, {}, scope);
expect(TestClient.instance!.event!.transaction).toEqual('updatedName');
expect(TestClient.instance!.event!.transaction).toEqual('/adopt/dont/shop');
expect(TestClient.instance!.event!.transaction_info).toEqual({
source: 'custom',
changes: [
Expand Down