Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
yunusefendi52 committed Nov 10, 2024
1 parent 5efd323 commit 99a8457
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"drizzle:generate": "drizzle-kit generate",
"drizzle:migrate": "bun run server/db/migrate.ts",
"deploy": "bun run build --preset=cloudflare-pages && npx wrangler pages deploy dist/",
"e2e": "NODE_OPTIONS=--require=dotenv/config playwright test",
"e2e": "NODE_OPTIONS=--require=dotenv/config playwright test --config=playwright2.config.mts",
"tests": "vitest test",
"build-cli": "bun build cli/cli.ts --target node > cli/cli.mjs"
},
Expand Down
30 changes: 30 additions & 0 deletions playwright2.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { fileURLToPath } from 'node:url'
import { defineConfig, devices } from '@playwright/test'
import type { ConfigOptions } from '@nuxt/test-utils/playwright'

export default defineConfig<ConfigOptions>({
webServer: {
command: 'bun run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
},
use: {
nuxt: {
setupTimeout: 60000,
host: 'http://localhost:3000',
},
},
testDir: './tests-e2e',
projects: [
{ name: 'Setup', testMatch: '**/*.setup.mts' },
{
name: 'Chromium',
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/user.json',
},
},
],
})

0 comments on commit 99a8457

Please sign in to comment.