Skip to content

Commit ba101b5

Browse files
committed
apply biome formatting
1 parent 7d1fd9e commit ba101b5

File tree

15 files changed

+198
-241
lines changed

15 files changed

+198
-241
lines changed

packages/e2e-tests/test-applications/sveltekit-2/playwright.config.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import type { PlaywrightTestConfig } from "@playwright/test";
2-
import { devices } from "@playwright/test";
1+
import type { PlaywrightTestConfig } from '@playwright/test';
2+
import { devices } from '@playwright/test';
33

44
// Fix urls not resolving to localhost on Node v17+
55
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
6-
import { setDefaultResultOrder } from "dns";
7-
setDefaultResultOrder("ipv4first");
6+
import { setDefaultResultOrder } from 'dns';
7+
setDefaultResultOrder('ipv4first');
88

99
const testEnv = process.env.TEST_ENV;
1010

1111
if (!testEnv) {
12-
throw new Error("No test env defined");
12+
throw new Error('No test env defined');
1313
}
1414

1515
const svelteKitPort = 3030;
@@ -19,7 +19,7 @@ const eventProxyPort = 3031;
1919
* See https://playwright.dev/docs/test-configuration.
2020
*/
2121
const config: PlaywrightTestConfig = {
22-
testDir: "./test",
22+
testDir: './test',
2323
/* Maximum time one test can run for. */
2424
timeout: 150_000,
2525
expect: {
@@ -34,9 +34,9 @@ const config: PlaywrightTestConfig = {
3434
/* Fail the build on CI if you accidentally left test.only in the source code. */
3535
forbidOnly: !!process.env.CI,
3636
/* `next dev` is incredibly buggy with the app dir */
37-
retries: testEnv === "development" ? 3 : 0,
37+
retries: testEnv === 'development' ? 3 : 0,
3838
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
39-
reporter: "list",
39+
reporter: 'list',
4040
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
4141
use: {
4242
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
@@ -45,29 +45,29 @@ const config: PlaywrightTestConfig = {
4545
baseURL: `http://localhost:${svelteKitPort}`,
4646

4747
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
48-
trace: "on-first-retry",
48+
trace: 'on-first-retry',
4949
},
5050

5151
/* Configure projects for major browsers */
5252
projects: [
5353
{
54-
name: "chromium",
54+
name: 'chromium',
5555
use: {
56-
...devices["Desktop Chrome"],
56+
...devices['Desktop Chrome'],
5757
},
5858
},
5959
],
6060

6161
/* Run your local dev server before starting the tests */
6262
webServer: [
6363
{
64-
command: "pnpm ts-node-script start-event-proxy.ts",
64+
command: 'pnpm ts-node-script start-event-proxy.ts',
6565
port: eventProxyPort,
6666
reuseExistingServer: false,
6767
},
6868
{
6969
command:
70-
testEnv === "development"
70+
testEnv === 'development'
7171
? `pnpm wait-port ${eventProxyPort} && pnpm dev --port ${svelteKitPort}`
7272
: `pnpm wait-port ${eventProxyPort} && pnpm preview --port ${svelteKitPort}`,
7373
port: svelteKitPort,

packages/e2e-tests/test-applications/sveltekit-2/src/hooks.server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { E2E_TEST_DSN } from "$env/static/private";
2-
import * as Sentry from "@sentry/sveltekit";
1+
import { E2E_TEST_DSN } from '$env/static/private';
2+
import * as Sentry from '@sentry/sveltekit';
33

44
Sentry.init({
5-
environment: "qa", // dynamic sampling bias to keep transactions
5+
environment: 'qa', // dynamic sampling bias to keep transactions
66
dsn: E2E_TEST_DSN,
77
debug: true,
88
tunnel: `http://localhost:3031/`, // proxy server
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const GET = () => {
2-
return new Response(JSON.stringify({ users: ["alice", "bob", "carol"] }));
2+
return new Response(JSON.stringify({ users: ['alice', 'bob', 'carol'] }));
33
};

packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
<script lang="ts">
2+
import * as Sentry from '@sentry/sveltekit';
3+
4+
async function getSentryData() {
5+
Sentry.startSpan({
6+
name: 'Example Frontend Span',
7+
}, async () => {
8+
const res = await fetch('/sentry-example');
9+
if (!res.ok) {
10+
throw new Error('Sentry Example Frontend Error');
11+
}
12+
})
13+
}
14+
</script>
15+
116
<h1>Check Build</h1>
217

318
<p>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const load = async () => {
2-
throw new Error("Server Load Error");
2+
throw new Error('Server Load Error');
33
return {
4-
msg: "Hello World",
4+
msg: 'Hello World',
55
};
66
};

packages/e2e-tests/test-applications/sveltekit-2/src/routes/server-route-error/+page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const load = async ({ fetch }) => {
2-
const res = await fetch("/server-route-error");
2+
const res = await fetch('/server-route-error');
33
const data = await res.json();
44
return {
55
msg: data,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const GET = async () => {
2-
throw new Error("Server Route Error");
2+
throw new Error('Server Route Error');
33
return {
4-
msg: "Hello World",
4+
msg: 'Hello World',
55
};
66
};
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { browser } from "$app/environment";
1+
import { browser } from '$app/environment';
22

33
export const load = async () => {
4-
throw new Error(`Universal Load Error (${browser ? "browser" : "server"})`);
4+
throw new Error(`Universal Load Error (${browser ? 'browser' : 'server'})`);
55
return {
6-
msg: "Hello World",
6+
msg: 'Hello World',
77
};
88
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const load = async ({ fetch }) => {
2-
const usersRes = await fetch("/api/users");
2+
const usersRes = await fetch('/api/users');
33
const data = await usersRes.json();
44
return { users: data.users };
55
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const load = async () => {
22
return {
3-
msg: "Hi everyone!",
3+
msg: 'Hi everyone!',
44
};
55
};

0 commit comments

Comments
 (0)