Index of every page on this site: llms.txt
All skills
Run it yourself

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

  • 6 files
  • 11.5 KB
  • Updated 6 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/soulesidibe/skync/tdd

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

tests.md

≈360 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Good and Bad Tests

Good Tests

Integration-style: Test through real interfaces, not mocks of internal parts.

// GOOD: Tests observable behavior
test "user can checkout with valid cart":
  cart = create_cart()
  cart.add(product)
  result = checkout(cart, payment_method)
  assert result.status == "confirmed"

Characteristics:

  • Tests behavior users/callers care about
  • Uses public API only
  • Survives internal refactors
  • Describes WHAT, not HOW
  • One logical assertion per test

Bad Tests

Implementation-detail tests: Coupled to internal structure.

// BAD: Tests implementation details
test "checkout calls payment_service.process":
  mock_payment = mock(payment_service)
  checkout(cart, payment)
  assert mock_payment.process.called_with(cart.total)

Red flags:

  • Mocking internal collaborators
  • Testing private methods
  • Asserting on call counts/order
  • Test breaks when refactoring without behavior change
  • Test name describes HOW not WHAT
  • Verifying through external means instead of interface
// BAD: Bypasses interface to verify
test "create_user saves to database":
  create_user({ name: "Alice" })
  row = db.query_one("SELECT * FROM users WHERE name = 'Alice'")
  assert row is not None

// GOOD: Verifies through interface
test "create_user makes user retrievable":
  user = create_user({ name: "Alice" })
  retrieved = get_user(user.id)
  assert retrieved.name == "Alice"

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at c4bae9f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 weeks ago.

Steadyupdated 6 months ago

README badge

README badge for soulesidibe/skync/tdd