thebeardedbearsas/claude-craft

testing

TDD/BDD testing principles. Use when writing tests, reviewing test coverage, setting up testing, or discussing test strategy and test architecture.

First seen Jan 30, 2026

Installation

$ npx skills add thebeardedbearsas/claude-craft --skill testing

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from thebeardedbearsas/claude-craft · top by installs.

npx skills add thebeardedbearsas/claude-craft

Browse all from thebeardedbearsas/claude-craft

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 105
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,571 B
  • docs README.md 1,279 B
  • docs SUMMARY.md 162 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 135 installs

SKILL.md

Testing - Principes TDD/BDD (2026)

Principes universels de testing pour toutes les technologies du framework Claude-Craft.

Principes fondamentaux

  • TDD Cycle: RED → GREEN → REFACTOR
  • Couverture cible: >= 80%
  • Pyramide: Unit (70%) > Integration (20%) > E2E (10%)
  • Pattern: Arrange-Act-Assert (AAA)
  • Nommage: Tests descriptifs expliquant le comportement

Outils recommandés 2026

Stack Unit/Composants E2E/Browser Mutation Testing
JS/TS/React Vitest 4.1+ (Browser Mode stable) Playwright Stryker
PHP/Laravel/Symfony Pest 4.5+ (PHPUnit 12, Browser Testing) Playwright via Pest Infection
Python pytest 8.x + Ruff 0.8+ Playwright Mutmut
Flutter fluttertest + bloctest 10+ Patrol 3.13+ built-in
React Native RNTL + Jest Detox/Maestro Stryker

Sources : Vitest 4, Pest 4, Stryker Mutator

Stratégies 2026

Vitest 4 — Browser Mode stable

Abandonner JSDOM lourd. Chromium/Firefox/WebKit natifs.

// vitest.config.ts
export default defineConfig({
  test: {
    browser: {
      enabled: true,
      name: 'chromium', // ou 'firefox', 'webkit'
      provider: 'playwright',
    },
  },
});

Source : Vitest Browser Mode

Mutation Testing — "Coverage ment, mutation scores disent la vérité"

Tester la qualité des tests. Mutation score >= 80%.

# Stryker (JS/TS/C#)
npx stryker run

# Infection (PHP)
vendor/bin/infection --min-msi=80

# Mutmut (Python)
mutmut run

Source : Stryker Mutator

Property-based Testing

Générer des tests à partir de propriétés invariantes.

// fast-check (JS/TS)
import fc from 'fast-check';

test('sorting preserves all elements', () => {
  fc.assert(
    fc.property(fc.array(fc.integer()), (arr) => {
      const sorted = [...arr].sort();
      return sorted.length === arr.length;
    })
  );
});

Source : fast-check

Pest 4 — Browser Testing intégré

// Pest 4.5+ avec Playwright natif
test('user can login', function () {
    $this->browse(function (Browser $browser) {
        $browser->visit('/login')
            ->type('email', '[email protected]')
            ->type('password', 'secret')
            ->press('Login')
            ->assertPathIs('/dashboard');
    });
});

Source : Pest 4 Browser Testing

Vitest Workspaces — Monorepos

// vitest.workspace.ts
export default defineWorkspace([
  'packages/*/vitest.config.ts', // Unit tests
  {
    test: {
      browser: { enabled: true, name: 'chromium' },
      include: ['e2e/**/*.test.ts'],
    },
  }, // Browser tests
]);

Source : Vitest Workspaces


Voir @.claude/references/base/testing.md pour documentation complète.