Skip to content
Back to skills

Test Graph

ASecurity

This skill covers patterns for mocking RepoMaps in tests. Trigger: Load this skill when working with test_graph fixtures.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 26, 2026
ai-agentspythonbashnodetesting

Security analysis

A100/100

Scanned September 26, 2026

npx -y skills add JNZader/repoforge --skill test_graph --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Graph?

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

Security grade badge for Test Graph
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jnzader-test-graph/badge)](https://www.skillsdirectory.com/skills/jnzader-test-graph)

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: mock-repomaps-fixtures
description: >
  This skill covers patterns for mocking RepoMaps in tests.
  Trigger: Load this skill when working with test_graph fixtures.
license: Apache-2.0
metadata:
  author: repoforge
  version: "1.0"
  complexity: low
  token_estimate: 350
  dependencies: []
  related_skills: []
  load_priority: high
---

<!-- L1:START -->
# Mock RepoMaps Fixtures

This skill covers patterns for mocking RepoMaps in tests.

**Trigger**: Load this skill when working with test_graph fixtures.
<!-- L1:END -->

<!-- L2:START -->
## Quick Reference

| Task | Pattern |
|------|---------|
| Create a small graph fixture | `small_graph` |
| Test adding a node | `TestAddNode` |

## Critical Patterns (Summary)
- **small_graph**: Provides a predefined small graph for testing.
- **TestAddNode**: Tests the functionality of adding a node to the graph.
<!-- L2:END -->

<!-- L3:START -->
## Critical Patterns (Detailed)

### small_graph

This pattern provides a predefined small graph for testing purposes, allowing for consistent and repeatable tests.

```python
# Example usage of small_graph
from tests.test_graph import small_graph

def test_small_graph():
    assert len(small_graph.nodes) == expected_node_count
```

### TestAddNode

This pattern tests the functionality of adding a node to the graph, ensuring that the graph updates correctly.

```python
# Example usage of TestAddNode
from tests.test_graph import TestAddNode

def test_add_node():
    test_case = TestAddNode()
    test_case.run()
```

## When to Use

- When you need to create a small graph for unit tests.
- When testing the addition of nodes to a graph structure.

## Commands

```bash
pytest tests/test_graph.py
```

## Anti-Patterns

### Don't: Use real RepoMaps in tests

Using real RepoMaps can lead to flaky tests and inconsistent results.

```python
# BAD
from repo.maps import RepoMap

def test_with_real_repos():
    repo = RepoMap()
    assert repo is not None
```
<!-- L3:END -->

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.