skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
thebeardedbearsas/bear-craft136 installs

testing

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

How do I install this agent skill?

npx skills add https://github.com/thebeardedbearsas/bear-craft --skill testing
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides comprehensive guidelines, principles, and best practices for Test-Driven Development (TDD) and Behavior-Driven Development (BDD). It is an educational and informational resource that does not contain malicious code, suspicious network activities, or harmful commands.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Testing - Principes TDD/BDD (2026)

Principes universels de testing pour toutes les technologies du framework Bear-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

StackUnit/ComposantsE2E/BrowserMutation Testing
JS/TS/ReactVitest 5 (Browser Mode stable)PlaywrightStryker
PHP/Laravel/SymfonyPest 5 (PHPUnit 13, PHP 8.4+, Browser Testing)Playwright via PestInfection
Pythonpytest 9.x + Ruff 0.17+PlaywrightMutmut
Flutterflutter_test + bloc_test 10+Patrol 4built-in
React NativeRNTL 14 + JestMaestro (ou Detox)Stryker

Sources : Vitest Browser Mode, Pest 5 Upgrade Guide, Stryker Mutator

Stratégies 2026

Vitest 5 — Browser Mode stable

Abandonner JSDOM lourd. Chromium/Firefox/WebKit natifs.

// vitest.config.ts
import { defineConfig } from 'vitest/config';
import { playwright } from '@vitest/browser-playwright';

export default defineConfig({
  test: {
    browser: {
      enabled: true,
      provider: playwright(),
      instances: [{ browser: 'chromium' }], // ou 'firefox', 'webkit'
    },
  },
});

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 5 — Browser Testing intégré

// Pest 5 avec Playwright natif
test('user can login', function () {
    visit('/login')
        ->fill('email', 'alice@example.com')
        ->fill('password', 'secret')
        ->click('Login')
        ->assertPathIs('/dashboard');
});

Source : Pest Browser Testing

Vitest Projects — Monorepos

workspace est renommé projects depuis Vitest 3.2 ; un fichier vitest.workspace séparé n'est plus supporté en 4.x (déclarer projects dans vitest.config).

// vitest.config.ts
import { defineConfig } from 'vitest/config';
import { playwright } from '@vitest/browser-playwright';

export default defineConfig({
  test: {
    projects: [
      'packages/*', // Unit tests (un vitest.config par package)
      {
        test: {
          name: 'browser',
          include: ['e2e/**/*.test.ts'],
          browser: { enabled: true, provider: playwright(), instances: [{ browser: 'chromium' }] },
        },
      },
    ],
  },
});

Source : Vitest Projects

BDD — un outil Gherkin par écosystème

ÉcosystèmeOutil
JS/TSCucumber.js (@cucumber/cucumber)
PHP/SymfonyBehat 4.x
Pythonpytest-bdd

Pour l'E2E mobile, Maestro (flows YAML) couvre React Native, Flutter et natif ; Patrol (Flutter) et Detox (React Native) restent des alternatives intégrées à leur framework.


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

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/thebeardedbearsas/bear-craft/testing">View testing on skillZs</a>