@app-studio/qa-presets

中文文档
0.11.6发布于 2026/11/06UNLICENSEDTypeScriptES Module近 30 天下载 1966

Vitest and Playwright configurations built from qa.bindings.json, plus coverage and typecheck ratchets that let debt be visible but never grow.

原始使用文档

@app-studio/qa-presets

Bounded defaults for fast proof:

  • unit tests have short timeouts and no services;
  • shared integration worlds run serially;
  • Playwright does not retry;
  • Playwright is explicitly headless, so suite runs open no desktop windows;
  • the default proof profile records no video and retains a trace only on failure;
  • server reuse is opt-in when suite-specific environment matters.
createPlaywrightConfig({
  bindings,
  testDir: './tests/e2e',
  projects: [{ name: 'scenario', port: 'front' }],
});

Set profile: 'fast' (or QA_BROWSER_PROFILE=fast) for no runner-owned media, and profile: 'record' for headless video, trace and screenshots. Scenario v3 also omits its explicit checkpoint media in fast; the JSON verdict still runs.

For a Playwright host, qa scenario run --engine chromium --video webm (or QA_BROWSER_VIDEO=webm) enables video even with the fast profile. Playwright produces WebM; MP4 and GIF requests fail explicitly rather than producing no recording. The host must bind chromium to its Playwright scenario command. The video is available in Playwright's test output after the context closes.

Use separate Playwright projects to exercise unauthenticated direct navigation and English copy with a full browser's layout and hit testing:

projects: [
  { name: 'anonymous-en', port: 'front', use: {
    browserName: 'chromium', locale: 'en-US',
    storageState: { cookies: [], origins: [] },
  } },
]

In the scenario, navigate directly to the protected path and assert the resulting URL and visible sign-in content. Assert the expected English error text after the relevant action; if the application selects language independently of browser locale, configure that selection in the host as well. For overlapping menus, assert the topmost element or interact with it at the overlapping coordinate in Chromium; a screenshot from an approximate renderer alone cannot prove hit testing. Keep the scenario verdict and recording together as evidence.

To classify a failing existing test as pre-existing, run the same command and environment against both the candidate and its base revision in separate checkouts. Report both results and revisions; absence of changed lines in a diff does not establish that a failure predates the change.

State Fixture projects should use a separate config containing only the Debug Studio server.

版本与发布记录

@app-studio/qa-presets 共发布 33 个版本,首次发布于 2026/08/09;过去 12 个月发布了 33 个版本。

版本发布日期距今
0.11.6latest2026/11/062 天前
0.11.32026/11/017 天前
0.11.22026/10/2217 天前
0.11.12026/10/1622 天前
0.10.42026/10/081 个月前
0.10.3next2026/10/081 个月前

关于 @app-studio/qa-presets 的常见问题

@app-studio/qa-presets 是什么?

Vitest and Playwright configurations built from qa.bindings.json, plus coverage and typecheck ratchets that let debt be visible but never grow.

如何安装 @app-studio/qa-presets?

在项目目录运行 npm install @app-studio/qa-presets,或使用 pnpm add / yarn add / bun add。

@app-studio/qa-presets 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@app-studio/qa-presets 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@app-studio/qa-presets 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@app-studio/qa-presets 可以商用吗?

@app-studio/qa-presets 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@app-studio/qa-presets 的下载量有多少?

根据 npm 官方下载统计,@app-studio/qa-presets 在 2026/10/07 – 2026/11/05 这 30 天内被下载 1,966 次,日均约 66 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@app-studio/qa-presets 还在维护吗?

最新版本 0.11.6 发布于 2026/11/06(2 天前);至今共发布 33 个版本,其中过去 12 个月发布了 33 个;首次发布于 2026/08/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。