Skip to content

Commit e4011e4

Browse files
committed
simplify tests a bit
1 parent 00d7f3e commit e4011e4

File tree

28 files changed

+37
-105
lines changed

28 files changed

+37
-105
lines changed

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/consistent-sampling/default/test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import { getSpanOp, waitForStreamedSpanEnvelope } from '../../../../../../utils/
66

77
sentryTest.describe('When `consistentTraceSampling` is `true`', () => {
88
sentryTest('continues sampling decision from initial pageload span', async ({ getLocalTestUrl, page }) => {
9-
if (shouldSkipTracingTest()) {
10-
sentryTest.skip();
11-
}
9+
sentryTest.skip(shouldSkipTracingTest());
1210

1311
const url = await getLocalTestUrl({ testDir: __dirname });
1412

@@ -82,9 +80,7 @@ sentryTest.describe('When `consistentTraceSampling` is `true`', () => {
8280
});
8381

8482
sentryTest('Propagates continued sampling decision to outgoing requests', async ({ page, getLocalTestUrl }) => {
85-
if (shouldSkipTracingTest()) {
86-
sentryTest.skip();
87-
}
83+
sentryTest.skip(shouldSkipTracingTest());
8884

8985
const url = await getLocalTestUrl({ testDir: __dirname });
9086

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/consistent-sampling/meta-negative/test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ sentryTest.describe('When `consistentTraceSampling` is `true` and page contains
2020
sentryTest(
2121
'Continues negative sampling decision from meta tag across all traces and downstream propagations',
2222
async ({ getLocalTestUrl, page }) => {
23-
if (shouldSkipTracingTest()) {
24-
sentryTest.skip();
25-
}
23+
sentryTest.skip(shouldSkipTracingTest());
2624

2725
const url = await getLocalTestUrl({ testDir: __dirname });
2826

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/consistent-sampling/meta-precedence/test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ sentryTest.describe('When `consistentTraceSampling` is `true` and page contains
2020
sentryTest(
2121
'meta tag decision has precedence over sampling decision from previous trace in session storage',
2222
async ({ getLocalTestUrl, page }) => {
23-
if (shouldSkipTracingTest()) {
24-
sentryTest.skip();
25-
}
23+
sentryTest.skip(shouldSkipTracingTest());
2624

2725
const url = await getLocalTestUrl({ testDir: __dirname });
2826

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/consistent-sampling/meta/test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ const metaTagSampleRate = 0.2;
1313

1414
sentryTest.describe('When `consistentTraceSampling` is `true` and page contains <meta> tags', () => {
1515
sentryTest('Continues sampling decision across all traces from meta tag', async ({ getLocalTestUrl, page }) => {
16-
if (shouldSkipTracingTest()) {
17-
sentryTest.skip();
18-
}
16+
sentryTest.skip(shouldSkipTracingTest());
1917

2018
const url = await getLocalTestUrl({ testDir: __dirname });
2119

@@ -98,9 +96,7 @@ sentryTest.describe('When `consistentTraceSampling` is `true` and page contains
9896
sentryTest(
9997
'Propagates continued <meta> tag sampling decision to outgoing requests',
10098
async ({ page, getLocalTestUrl }) => {
101-
if (shouldSkipTracingTest()) {
102-
sentryTest.skip();
103-
}
99+
sentryTest.skip(shouldSkipTracingTest());
104100

105101
const url = await getLocalTestUrl({ testDir: __dirname });
106102

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/consistent-sampling/tracesSampler-precedence/test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ import { getSpanOp, waitForStreamedSpanEnvelope } from '../../../../../../utils/
1818
*/
1919
sentryTest.describe('When `consistentTraceSampling` is `true`', () => {
2020
sentryTest('explicit sampling decisions in `tracesSampler` have precedence', async ({ getLocalTestUrl, page }) => {
21-
if (shouldSkipTracingTest()) {
22-
sentryTest.skip();
23-
}
21+
sentryTest.skip(shouldSkipTracingTest());
2422

2523
const url = await getLocalTestUrl({ testDir: __dirname });
2624

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/custom-trace/test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import { shouldSkipTracingTest } from '../../../../../utils/helpers';
55
import { getSpanOp, waitForStreamedSpan } from '../../../../../utils/spanUtils';
66

77
sentryTest('manually started custom traces are linked correctly in the chain', async ({ getLocalTestUrl, page }) => {
8-
if (shouldSkipTracingTest()) {
9-
sentryTest.skip();
10-
}
8+
sentryTest.skip(shouldSkipTracingTest());
119

1210
const url = await getLocalTestUrl({ testDir: __dirname });
1311

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/default/test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import { shouldSkipTracingTest } from '../../../../../utils/helpers';
55
import { getSpanOp, waitForStreamedSpan } from '../../../../../utils/spanUtils';
66

77
sentryTest("navigation spans link back to previous trace's root span", async ({ getLocalTestUrl, page }) => {
8-
if (shouldSkipTracingTest()) {
9-
sentryTest.skip();
10-
}
8+
sentryTest.skip(shouldSkipTracingTest());
119

1210
const url = await getLocalTestUrl({ testDir: __dirname });
1311

@@ -73,9 +71,7 @@ sentryTest("navigation spans link back to previous trace's root span", async ({
7371
});
7472

7573
sentryTest("doesn't link between hard page reloads by default", async ({ getLocalTestUrl, page }) => {
76-
if (shouldSkipTracingTest()) {
77-
sentryTest.skip();
78-
}
74+
sentryTest.skip(shouldSkipTracingTest());
7975

8076
const url = await getLocalTestUrl({ testDir: __dirname });
8177

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/interaction-spans/test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ import { getSpanOp, waitForStreamedSpan } from '../../../../../utils/spanUtils';
1313
sentryTest(
1414
'only the first root spans in the trace link back to the previous trace',
1515
async ({ getLocalTestUrl, page }) => {
16-
if (shouldSkipTracingTest()) {
17-
sentryTest.skip();
18-
}
16+
sentryTest.skip(shouldSkipTracingTest());
1917

2018
const url = await getLocalTestUrl({ testDir: __dirname });
2119

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/meta/test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import { getSpanOp, waitForStreamedSpan } from '../../../../../utils/spanUtils';
77
sentryTest(
88
"links back to previous trace's local root span if continued from meta tags",
99
async ({ getLocalTestUrl, page }) => {
10-
if (shouldSkipTracingTest()) {
11-
sentryTest.skip();
12-
}
10+
sentryTest.skip(shouldSkipTracingTest());
1311

1412
const url = await getLocalTestUrl({ testDir: __dirname });
1513

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/linked-traces-streamed/negatively-sampled/test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import { shouldSkipTracingTest } from '../../../../../utils/helpers';
55
import { getSpanOp, waitForStreamedSpan } from '../../../../../utils/spanUtils';
66

77
sentryTest('includes a span link to a previously negatively sampled span', async ({ getLocalTestUrl, page }) => {
8-
if (shouldSkipTracingTest()) {
9-
sentryTest.skip();
10-
}
8+
sentryTest.skip(shouldSkipTracingTest());
119

1210
const url = await getLocalTestUrl({ testDir: __dirname });
1311

0 commit comments

Comments
 (0)