Skip to content

Commit 0506169

Browse files
committed
test: set up e2e test
1 parent 796edb9 commit 0506169

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ isolate-*
1616

1717
# Node's Source Folder
1818
node
19+
20+
# Playwright
21+
playwright-report/
22+
test-results/

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"test:ci": "c8 --reporter=lcov node --test --experimental-test-module-mocks \"src/**/*.test.mjs\" --test-reporter=@reporters/github --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=junit.xml --test-reporter=spec --test-reporter-destination=stdout",
1818
"test:update-snapshots": "node --test --experimental-test-module-mocks --test-update-snapshots \"src/**/*.test.mjs\"",
1919
"test:watch": "node --test --experimental-test-module-mocks --watch \"src/**/*.test.mjs\"",
20+
"test:e2e": "playwright test",
2021
"prepare": "husky || exit 0",
2122
"run": "node bin/cli.mjs",
2223
"watch": "node --watch bin/cli.mjs"
@@ -40,6 +41,7 @@
4041
"globals": "~17.4.0",
4142
"husky": "^9.1.7",
4243
"lint-staged": "^16.4.0",
44+
"@playwright/test": "^1.59.1",
4345
"prettier": "3.8.1"
4446
},
4547
"dependencies": {

playwright.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig, devices } from '@playwright/test';
2+
3+
export default defineConfig({
4+
testDir: './e2e',
5+
use: {
6+
baseURL: 'http://localhost:3000',
7+
},
8+
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
9+
});

0 commit comments

Comments
 (0)