一键导入
nx-testing
Testing workflows with Vitest in Nx monorepo. Use when writing tests, running test suites, or debugging test failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Testing workflows with Vitest in Nx monorepo. Use when writing tests, running test suites, or debugging test failures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Auth engine rules for QAuth. Use when working with CredentialProvider implementations, token claim generation, the provider registry, or the federation layer. Enforces the pluggable provider pattern and correct token claim behaviour.
OAuth 2.1 / OIDC rules for QAuth. Use when working with authorization endpoints, token flows, PKCE, JWKS, OIDC discovery, or spec compliance (RFC 9700, OIDC Core 1.0). Covers endpoint behaviour, email claim rules, and token security.
Database schema rules for QAuth. Use when working with the identity model, Drizzle ORM, migrations, repositories, or claim resolution. Reflects the CURRENT shipped schema — the identifier-abstraction model (ADR-002, IMPLEMENTED via Epic
Link GitHub issues in parent-child (sub-issue) relationships using GraphQL
Add a GitHub issue to a project board using gh project item-add
Create a new GitHub issue following QAuth project conventions using gh issue create
基于 SOC 职业分类
| name | nx-testing |
| description | Testing workflows with Vitest in Nx monorepo. Use when writing tests, running test suites, or debugging test failures. |
# Single project
pnpm nx test auth-server
pnpm nx test auth-server --watch
pnpm nx test auth-server --coverage
# Multiple projects
pnpm nx run-many -t test --all
pnpm nx affected -t test
pnpm nx run-many -t test --all --parallel=3
# Vitest UI
pnpm test:ui
Co-locate tests with source:
libs/server/jwt/src/
├── jwt.service.ts
├── jwt.service.spec.ts
└── index.ts
import { describe, it, expect, beforeEach } from 'vitest';
import { createService } from './service';
describe('Service', () => {
let service: ReturnType<typeof createService>;
beforeEach(() => {
service = createService();
});
it('should do something', () => {
expect(service.method()).toBe(expected);
});
});
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { buildTestApp } from '@qauth-labs/shared-testing';
import type { FastifyInstance } from 'fastify';
describe('Route', () => {
let app: FastifyInstance;
beforeAll(async () => {
app = await buildTestApp();
});
afterAll(async () => {
await app.close();
});
it('should return 200', async () => {
const response = await app.inject({
method: 'GET',
url: '/health',
});
expect(response.statusCode).toBe(200);
});
});
@qauth-labs/shared-testing utilities