e2e-replit
Use when asked about E2E testing, Playwright, or browser-based tests in this Replit environment. Covers the constraint that Playwright cannot run due to missing system libraries, and the vitest alternative already set up.
- License 许可
- MIT
- 所属仓库
- ruake/AWARE
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- e2e-replit
- description
- Use when asked about E2E testing, Playwright, or browser-based tests in this Replit environment. Covers the constraint that Playwright cannot run due to missing system libraries, and the vitest alternative already set up.
03 SKILL.md 正文
E2E Testing in this Replit Environment
Key constraint
Playwright browsers (Chromium, etc.) require system libraries (libglib-2.0, libdbus-1, libnss3, libX11, etc.) that are not available in this Replit environment — apt-get is blocked and nix packages for some libraries (dbus, libX11) don't include the actual .so files. Therefore, Playwright E2E tests cannot run here. The @playwright/test package is installed but attempts to launch Chromium will fail with missing shared library errors.
Testing strategy
- Use vitest (already installed at
artifacts/aware-app/node_modules/vitest) for unit/integration tests - vitest runs in Node.js and uses
happy-domfor DOM emulation, so no real browser is needed - Test files live at
artifacts/aware-app/src/**/*.test.ts
Commands (run from artifacts/aware-app/)
| Command | Purpose |
|---|---|
pnpm test |
Run all tests once (vitest run) |
pnpm test:watch |
Run tests in watch mode |
pnpm run typecheck |
TypeScript check (must pass before commit) |
Test infrastructure
- Test runner: vitest 4.x (
vitest.config.tsat project root) - DOM environment:
happy-dom(no real browser needed) - Config:
artifacts/aware-app/vitest.config.ts— uses@/path alias, happy-dom env - Existing tests:
artifacts/aware-app/src/lib/llm.test.ts— 18 tests covering copilot flow, mock LLM routing, config persistence
Writing new tests
- Place test files next to source files with
.test.tsor.test.tsxextension - vitest globals (
describe,it,expect) are available viaglobals: truein config - Use
localStorage.clear()inbeforeEachif tests touch localStorage - No browser APIs beyond what happy-dom provides
Adding E2E tests if system deps become available
- Install Playwright properly:
pnpm add -D @playwright/test - Install browsers with deps (may require
sudo apt-get install -ysystem deps):npx playwright install --with-deps chromium - Create tests in
e2e/directory - Run:
npx playwright test
04 同仓库更多 Skills
xlsx
暂无简介
writing-plans
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste.
web-design-guidelines
Review files for compliance with Web Interface Guidelines.
web-component-design
Build reusable, maintainable UI components using modern frameworks with clean composition patterns and styling approache
web-artifacts-builder
暂无简介
vueuse-functions
This skill is a decision-and-implementation guide for VueUse composables in Vue.js / Nuxt projects. It maps requirements