Skip to content

Commit 178c026

Browse files
committed
Moved port definition into constants module
1 parent 7144180 commit 178c026

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

test/example-tests.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { defineConfig, devices } from 'playwright/test';
2-
3-
const VANILLA_PORT = 4567;
4-
const VITE_PORT = 4568;
5-
const NEXT_PORT = 4569;
2+
import { VANILLA_PORT, VITE_PORT, NEXT_PORT } from './ports.js';
63

74
export default defineConfig({
85
testDir: './examples',

test/examples/react/smoke.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77
* 3. (react-wrappers only) media-* custom elements are registered
88
*/
99
import { test, expect } from 'playwright/test';
10+
import { VITE_PORT, NEXT_PORT } from '../../ports.js';
1011

1112
test.describe.configure({ mode: 'parallel' });
1213

13-
const VITE_PORT = 4568;
14-
const NEXT_PORT = 4569;
15-
1614
// MUI + Emotion always produces a hydration mismatch in Next.js dev mode due to
1715
// server-rendered <style> tags differing from the client. Known limitation of the example.
1816
const EXPECTS_ERROR: Map<string, { expectedErrors: string[] }> = new Map(

test/ports.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const VANILLA_PORT = 4567;
2+
export const VITE_PORT = 4568;
3+
export const NEXT_PORT = 4569;

0 commit comments

Comments
 (0)