Skip to content

Commit 516ede0

Browse files
committed
fix(e2e): fix worker filename regex patterns
1 parent 212a8bb commit 516ede0

File tree

1 file changed

+5
-5
lines changed
  • dev-packages/e2e-tests/test-applications/browser-webworker-vite/tests

1 file changed

+5
-5
lines changed

dev-packages/e2e-tests/test-applications/browser-webworker-vite/tests/errors.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';
33

4-
// In dev mode, worker files are served as .ts with query params
5-
// In prod mode, worker files are bundled as .js with hashes
6-
const WORKER_FILENAME_PATTERN = /worker(-.+\.js|\\.ts\?worker_file)/;
7-
const WORKER2_FILENAME_PATTERN = /worker2(-.+\.js|\\.ts\?worker_file)/;
8-
const WORKER3_FILENAME_PATTERN = /worker3(-.+\.js|\\.ts\?worker_file)/;
4+
// In dev mode, worker files are served as .ts with query params (e.g., worker.ts?worker_file&type=module)
5+
// In prod mode, worker files are bundled as .js with hashes (e.g., worker-abc123.js)
6+
const WORKER_FILENAME_PATTERN = /worker(-.+\.js|\.ts\?worker_file)/;
7+
const WORKER2_FILENAME_PATTERN = /worker2(-.+\.js|\.ts\?worker_file)/;
8+
const WORKER3_FILENAME_PATTERN = /worker3(-.+\.js|\.ts\?worker_file)/;
99

1010
test('captures an error with debug ids and pageload trace context', async ({ page }) => {
1111
const errorEventPromise = waitForError('browser-webworker-vite', async event => {

0 commit comments

Comments
 (0)