-
Notifications
You must be signed in to change notification settings - Fork 11
test: add browser interaction tests, formatter/pipeline coverage, and CI browser support #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bf9f4b7
3fb6122
936109f
cfa3e12
0965c2f
fd2193d
c21ca1f
289a250
6c552dd
914046a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,10 +25,10 @@ | |
| "migrate": "node scripts/migrate.mjs", | ||
| "test": "node scripts/test.mjs", | ||
| "test:watch": "vitest", | ||
| "test:browser": "vitest run --project browser", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The added script 'test:browser' relies on the 'vitest' runner being configured to handle a 'browser' project. The diff removes '@cloudflare/vitest-pool-workers', which is often associated with browser/worker testing environments. If this script is intended to run browser tests, ensure that the necessary browser providers (like Playwright or WebdriverIO) are explicitly defined in the devDependencies, otherwise the new CI step will fail upon execution. |
||
| "typecheck": "tsc --noEmit" | ||
| }, | ||
| "devDependencies": { | ||
| "@cloudflare/vitest-pool-workers": "^0.16.20", | ||
| "@tailwindcss/vite": "^4.2.2", | ||
| "@testing-library/dom": "^10.4.1", | ||
| "@testing-library/jest-dom": "^6.9.1", | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -74,4 +74,4 @@ if (!usableEnvValue(process.env.TEST_DATABASE_URL)) { | |||||
| process.env.DATABASE_URL = process.env.TEST_DATABASE_URL; | ||||||
|
|
||||||
| run(process.execPath, ['scripts/migrate.mjs']); | ||||||
| run(process.execPath, ['node_modules/vitest/vitest.mjs', 'run']); | ||||||
| run(process.execPath, ['node_modules/vitest/vitest.mjs', 'run', '--project', 'node']); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Hardcoding the path to 'node_modules/vitest/vitest.mjs' is fragile. It assumes the script is always executed from the root of the project and that Vitest is hoisted to the top-level node_modules, which might not be true in monorepo structures or different package manager configurations. It is safer to use 'require.resolve' or 'npm bin'/'npx' patterns to locate the executable.
Suggested change
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache key for Playwright relies solely on package-lock.json. If the Playwright version is pinned in package.json but not updated in lockfile changes, or if environmental factors change, the cache might become stale or inconsistent. Furthermore, running 'npx playwright install' after restoring a cache might lead to partial installation states or redundant downloads if the cache is corrupted.