Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
alan2207 committed Apr 29, 2024
1 parent 461de9c commit ad5335a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
19 changes: 16 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig, devices } from '@playwright/test';

const port = 3000;
const PORT = 3000;

/**
* Read environment variables from file.
Expand Down Expand Up @@ -38,13 +38,26 @@ export default defineConfig({
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
},

{
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
},
],

/* Run your local dev server before starting the tests */
webServer: {
command: `npx vite --port ${port}`,
command: `yarn start --port ${PORT}`,
timeout: 10 * 1000,
port,
port: PORT,
reuseExistingServer: !process.env.CI,
},
});
16 changes: 8 additions & 8 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { createRoot } from 'react-dom/client';

import './index.css';
import App from './App';
// import { initMocks } from './test/server';
import { initMocks } from './test/server';

const root = createRoot(document.getElementById('root') as HTMLElement);

// initMocks().then(() => {
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
// });
initMocks().then(() => {
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
});

0 comments on commit ad5335a

Please sign in to comment.