Install
openclaw skills install unit-test-philosophyRisk-based unit testing and Allure-readable behavioral spec style for open-agreements. Use when user says "add tests," "test quality," "coverage expansion," "unit test style," or "Allure test spec." Applies when adding/updating tests, expanding coverage, or reviewing test quality across src, integration-tests, and workspace packages.
openclaw skills install unit-test-philosophysrc/, integration-tests/, packages/contracts-workspace, or packages/contracts-workspace-mcp.Execute test body.integration-tests/helpers/allure-test.tsitAllure, testAllure, allureStep, allureJsonAttachment, allurePrettyJsonAttachment, allureWordLikeTextAttachment, allureParameter, allureSeverityallure-vitest in tests.src/**/*.test.ts and integration-tests/**/*.test.ts.scripts/patch_allure_html_sanitizer.mjs, invoked by npm run report:allure). Do not bypass this pipeline when generating reports for review.src/<module>.test.ts.*.allure.test.ts files to *.test.ts; do not introduce new *.allure.test.ts files..openspec('OA-###') whenever a matching scenario ID exists for the behavior.openspec/specs/open-agreements/spec.md) or active change-package specs (openspec/changes/<change-id>/specs/open-agreements/spec.md).src/core/** and integration flows.critical: mutation correctness, legal-output integrity, data-loss risk, security/policy guardrails.normal: standard behavior and compatibility scenarios.minor: narrow edge cases with low production impact.npm run test:run
npm run test:coverage
npm run check:spec-coverage
npm run check:allure-labels
import { describe, expect } from 'vitest';
import { itAllure as it, allureStep, allureJsonAttachment } from '../../../integration-tests/helpers/allure-test.js';
describe('checklist patch behavior', () => {
it('applies replacement deterministically', async () => {
let result: { ok: boolean };
await allureStep('Given a valid patch payload', async () => {
await allureJsonAttachment('patch-input.json', {
patch_id: 'patch_001',
operations: [{ op: 'replace', path: '/issues/0/status', value: 'CLOSED' }],
});
});
await allureStep('When patch validation runs', async () => {
result = { ok: true };
});
await allureStep('Then validation succeeds', async () => {
expect(result!.ok).toBe(true);
});
});
});
references/allure-test-spec-writing-guide.md for full Allure step-writing guidance.