writing-tests

Construct Clojure tests with Fulcro Spec, mocking, spying, and log capture.

1|Updated Aug 16, 2018
One-click install
npx skills add https://github.com/saskenuba/dotfiles --skill writing-tests-saskenuba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-tests
Source: https://github.com/saskenuba/dotfiles/tree/main/ai/.claude/skills/writing-tests
Command: npx skills add https://github.com/saskenuba/dotfiles --skill writing-tests-saskenuba

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers compose robust tests for Clojure projects by using Fulcro Spec, including specifications, assertions, mocking with when-mocking!, spying, and log capture within real codebases.

Core Features & Use Cases

  • Structured testing guidance for Fulcro Spec that clarifies how to organize groups, components, and behaviors.
  • Advanced mocking and spying demonstrations using when-mocking! and mock utilities to verify interactions.
  • Log capture and verification techniques to assert on emitted logs in tests.
  • Practical examples spanning unit and integration level scenarios in a typical codebase.

Quick Start

Create a new test file in ai/.claude/skills/writing-tests that defines a simple specification with a single group and a basic assertion, then run your tests with your CI workflow.

Frequently Asked Questions about writing-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I mock functions in Clojure tests using Fulcro Spec?

Mock functions in Fulcro Spec tests using the when-mocking! macro to verify interactions and spy on behaviors. It provides advanced mocking utilities within a structured testing environment for robust Clojure codebases.

How do I capture and verify logs in my Clojure test suite?

Capture and assert on emitted logs in Clojure tests using Fulcro Spec's log capture techniques. This allows you to verify log outputs directly within your CI and development workflows during test execution.

What is the best way to structure Fulcro Spec tests for a Clojure project?

Structure Fulcro Spec tests by organizing specifications into groups, components, and behaviors. This skill provides structured testing guidance to clarify unit and integration test organization within typical codebases.

Do I need a specific Clojure environment to use Fulcro Spec mocking?

Yes, using Fulcro Spec for mocking, spying, and log capture requires a Clojure environment with Fulcro Spec libraries installed. It also relies on guidance Markdown in SKILL.md and related helper namespaces.

Can I use Fulcro Spec for both unit and integration testing?

Yes, Fulcro Spec supports both unit and integration level scenarios. The skill provides practical examples spanning both levels, utilizing specifications, assertions, and when-mocking! utilities for comprehensive coverage.