Skip to content

Commit cb25b55

Browse files
JPeer264claude
andcommitted
fixup! test(cloudflare): Add E2E test that deploys a real Worker and sends to Sentry
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent e589a4d commit cb25b55

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • dev-packages/e2e-tests/test-applications/cloudflare-workers-send-to-sentry

dev-packages/e2e-tests/test-applications/cloudflare-workers-send-to-sentry/global-setup.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { randomBytes } from 'node:crypto';
2+
import { existsSync } from 'node:fs';
23
import { deleteWorker, deployWorker, keepsWorker, waitForWorker } from './deployed-worker.mjs';
34

45
const WORKER_PREFIX = 'e2e-send-to-sentry';
@@ -24,7 +25,7 @@ export function getWorkerName() {
2425
}
2526

2627
export default async function globalSetup() {
27-
if (!existsSync(join(__dirname, '.wrangler/deploy/config.json'))) {
28+
if (!existsSync(new URL('.wrangler/deploy/config.json', import.meta.url))) {
2829
throw new Error('Run `pnpm build` first: wrangler would deploy the uninstrumented source.');
2930
}
3031
const { CLOUDFLARE_ACCOUNT_ID, E2E_TEST_DSN } = process.env;

0 commit comments

Comments
 (0)