Skip to content
Back to skills

Cairo Component Testing

ASecurity

Explain how to test Starknet components by embedding them into mock contracts and dispatching calls; use when a request involves unit tests for component logic in Cairo.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
testingtesting

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill cairo-component-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Component Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cairo Component Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-cairo-component-testing/badge)](https://www.skillsdirectory.com/skills/david-li0406-cairo-component-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cairo-component-testing
description: Explain how to test Starknet components by embedding them into mock contracts and dispatching calls; use when a request involves unit tests for component logic in Cairo.
---

# Cairo Component Testing

## Overview
Show how to test components by embedding them into a mock contract and using dispatchers.

## Quick Use
- Read `references/component-testing.md` before answering.
- Build a minimal contract that embeds the component.
- Use the component interface dispatcher in tests.

## Response Checklist
- Embed component storage and events into the mock contract.
- Expose component functions via impl alias with `#[abi(embed_v0)]`.
- Use a dispatcher to call component entry points from tests.

## Example Requests
- "How do I write tests for a component?"
- "Do I need a full contract to test a component?"
- "How do I call component functions in tests?"

Files in this skill

  • SKILL.md906 B
  • references/component-testing.md440 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…