Skip to content

Commit e0e9456

Browse files
committed
fixup! test(astro,cloudflare): Add an E2E test for Astro 6 on Cloudflare
1 parent c00dbcc commit e0e9456

6 files changed

Lines changed: 10107 additions & 9176 deletions

File tree

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import * as Sentry from '@sentry/cloudflare';
2-
import handler from "@astrojs/cloudflare/entrypoints/server";
2+
import handler from '@astrojs/cloudflare/entrypoints/server';
33

4-
export default Sentry.withSentry((env) => ({
5-
dsn: env.E2E_TEST_DSN,
6-
environment: 'qa',
7-
tracesSampleRate: 1.0,
8-
tunnel: 'http://localhost:3031/', // proxy server
9-
debug: true,
10-
}), handler);
4+
export default Sentry.withSentry(
5+
env => ({
6+
dsn: env.E2E_TEST_DSN,
7+
environment: 'qa',
8+
tracesSampleRate: 1.0,
9+
tunnel: 'http://localhost:3031/', // proxy server
10+
debug: true,
11+
}),
12+
handler,
13+
);

dev-packages/e2e-tests/test-applications/astro-6-cf-workers/tests/tracing.dynamic.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ test.describe('nested SSR routes (client, server, server request)', () => {
167167
expect(serverHTTPServerRequestTxn.contexts?.trace?.parent_span_id).toEqual(serverRequestHTTPClientSpan?.span_id);
168168
});
169169

170-
// Astro 6 lowercases routePattern and the internal manifest access (Symbol.for('context.routes'))
171-
// no longer works, so route names are lowercased (e.g. [userid] instead of [userId]).
172170
test('sends parametrized pageload, server and API request transaction names', async ({ page }) => {
173171
const clientPageloadTxnPromise = waitForTransaction('astro-6-cf-workers', txnEvent => {
174172
return txnEvent?.transaction?.startsWith('/user-page/') ?? false;
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{
22
"extends": "astro/tsconfigs/strict",
3-
"include": [
4-
".astro/types.d.ts",
5-
"**/*",
6-
"./worker-configuration.d.ts"
7-
],
8-
"exclude": [
9-
"dist"
10-
]
11-
}
3+
"include": [".astro/types.d.ts", "**/*", "./worker-configuration.d.ts"],
4+
"exclude": ["dist"]
5+
}

0 commit comments

Comments
 (0)