package-testing
Skill78 starsChanged 3 months agoMITView on GitHub
Use this skill when writing, editing, fixing, or reviewing package tests with Pest 4/5 and Orchestra Testbench, including TDD, feature tests, unit tests, type coverage, arch tests, workbench behavior, commands, routes, config, migrations, and publishable resources.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- meteor/meteortheir own version, first seen Nov 16, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- meteor/meteor★ 45ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- md/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/llms-full.txtllms.txt
- docs/llms.txtllms.txt
- package-compatibilitySkill
- package-generate-skillSkill
- package-releaseSkill
- package-scaffoldSkill
- package-compatibilitySkill
- package-generate-skillSkill
- package-releaseSkill
- package-scaffoldSkill
- package-testingSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Start with TDD: write the smallest failing package test for the requested behavior, then implement the smallest change that makes it pass.
- Distinctive: line 19
Prefer focused feature tests for package integration behavior and arch tests for broad constraints.
- Very specific: line 20
Use composer test:unit -- --filter ...
- Distinctive: line 21
Keep real package tests in the suite and remove only throwaway tests that were explicitly created for local scaffolding experiments.
- Distinctive: line 34
Test config merge and config override by asserting default package config, then overriding the host config value in the Testbench app.
- Distinctive: line 35
Test publishable assets, migrations, views, lang files, or config by invoking vendor publish behavior and asserting the target path exists.
- Very specific: line 36
Test routes with Testbench HTTP requests, commands with Artisan assertions, migrations with a SQLite test database, and workbench behavior …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Package Testing
Primary Goal
Prove package behavior with Pest 4/5, Orchestra Testbench, and the local tests/TestCase.php setup before or alongside implementation.
Workflow
- Start with TDD: write the smallest failing package test for the requested behavior, then implement the smallest change that makes it pass.
- Cover happy-path, unhappy-path, and edge-case behavior when the feature has meaningful failure modes.
- Prefer focused feature tests for package integration behavior and arch tests for broad constraints.
- Use
composer test:unit -- --filter ...while iterating,composer test:typeswhen type-sensitive tests or code changed, andcomposer testbefore finishing. - Keep real package tests in the suite and remove only throwaway tests that were explicitly created for local scaffolding experiments.
References
tests/TestCase.phptests/Pest.phptests/Feature/tests/Unit/tests/ArchTest.phpcomposer.jsonscripts
Examples
- Test config merge and config override by asserting default package config, then overriding the host config value in the Testbench app.
- Test publishable assets, migrations, views, lang files, or config by invoking vendor publish behavior and asserting the target path exists.
- Test routes with Testbench HTTP requests, commands with Artisan assertions, migrations with a SQLite test database, and workbench behavior after
composer buildwhen needed.
Anti-Patterns
- Deleting real package tests because they are inconvenient.
- Relying only on smoke tests when behavior needs assertions.
- Testing implementation details when observable package behavior is available.
- Keeping throwaway scaffolding experiment tests in the package test suite.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

