xiaohongshu
xiaohongshu
integration-e2e-testing
Designs integration and E2E tests with mock boundaries and behavior verification rules. Use when writing E2E or integration tests.
Full skill instructions
| Type | Purpose | File Format | Limit |
|---|---|---|---|
| Integration Test | Component interaction verification | *.int.test.ts | 3 per feature |
| E2E Test | Critical user journey verification | *.e2e.test.ts | 1-2 per feature |
Critical User Journey: Features with revenue impact, legal requirements, or daily use by majority of users
| Check | Question | If NO |
|---|---|---|
| Observable | Can user observe the result? | Exclude |
| System Context | Does it require integration of multiple components? | Exclude |
| Automatable | Can it run stably in CI environment? | Exclude |
Include: Business logic accuracy, data integrity, user-visible features, error handling Exclude: External live connections, performance metrics, implementation details, UI layout
// AC: "[Acceptance criteria original text]"
// ROI: [0-100] | Business Value: [0-10] | Frequency: [0-10]
// Behavior: [Trigger] -> [Process] -> [Observable Result]
// @category: core-functionality | integration | edge-case | ux | e2e
// @dependency: none | [component name] | full-system
// @complexity: low | medium | high
it.todo('[AC number]: [Test name]')
// Property: `[Verification expression]`
// fast-check: fc.property(fc.[arbitrary], (input) => [invariant])
it.todo('[AC number]-property: [Invariant description]')
ROI = (Business Value x Frequency + Legal Requirement x 10 + Defect Detection) / Total Cost
| Type | Total Cost | E2E Generation Condition |
|---|---|---|
| Integration | 11 | - |
| E2E | 38 | ROI > 50 |
When Property annotation exists, fast-check library is required:
import fc from 'fast-check'
it('AC2-property: Model name is always gemini-3-pro-image-preview', () => {
fc.assert(
fc.property(fc.string(), (prompt) => {
const result = client.generate(prompt)
return result.model === 'gemini-3-pro-image-preview'
})
)
})
Requirements:
fc.assert(fc.property(...)) format// fast-check: comment directly in implementationBehavior Description Verification Levels:
| Step Type | Verification Target | Example |
|---|---|---|
| Trigger | Reproduce in Arrange | API failure -> mockResolvedValue({ ok: false }) |
| Process | Intermediate state or call | Function call, state change |
| Observable Result | Final output value | Return value, error message, log output |
Pass Criteria: Pass if "observable result" is verified as return value or mock call argument of test target
| Skeleton State | Verification Item Determination Method |
|---|---|
// Verification items: listed | Implement all listed items with expect |
No // Verification items: | Derive from "observable result" in "Behavior" description |
| Both present | Prioritize verification items, use behavior as supplement |
| Judgment Criteria | Mock | Actual |
|---|---|---|
| Part of test target? | No -> Can mock | Yes -> Actual required |
| Is call verification target of test? | No -> Can mock | Yes -> Actual or verifiable mock |
| External network communication? | Yes -> Mock required | No -> Actual recommended |
Judgment Flow:
@dependency: full-system)| Check | Failure Condition |
|---|---|
| Property Verification | Property annotation exists but fast-check not used |
| Behavior Verification | No expect for "observable result" |
| Verification Item Coverage | Listed verification items not included in expect |
| Mock Boundary | Internal components mocked in integration test |
| Check | Failure Condition |
|---|---|
| AAA Structure | Arrange/Act/Assert separation unclear |
| Independence | State sharing between tests, execution order dependency |
| Reproducibility | Depends on date/random, results vary |
| Readability | Test name and verification content don't match |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience