From shopware-testing
Jest-Tests für Storefront-JS-Plugins in Shopware 6: Test-Setup (composer storefront:unit), PluginManager/DOM mocken, Plugin-Methoden testen. Trigger: "Jest storefront", "storefront:unit", "JS Plugin test storefront", "PluginBaseClass test", "storefront unit test". Shopware 6.7.
How this skill is triggered — by the user, by Claude, or both
Slash command
/shopware-testing:sw-jest-storefrontThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Storefront-JS-Plugins mit Jest testen (`composer storefront:unit`). DOM via jsdom, Plugin instanziieren und Verhalten prüfen.
Storefront-JS-Plugins mit Jest testen (composer storefront:unit). DOM via jsdom, Plugin instanziieren und Verhalten prüfen.
import FfExamplePlugin from 'src/ff-example/ff-example.plugin';
describe('FfExamplePlugin', () => {
it('binds click', () => {
document.body.innerHTML = '<div data-ff-example><button data-ff-trigger></button></div>';
const el = document.querySelector('[data-ff-example]');
const plugin = new FfExamplePlugin(el);
// init() ggf. manuell aufrufen; Events/Optionen prüfen
});
});
window.PluginManager/$emitter bei Bedarf mocken. AJAX (HttpClient) stubben. Für TS-Plugins gilt dasselbe
(shopware-storefront → sw-storefront-typescript). E2E stattdessen: sw-playwright-e2e.
npx claudepluginhub zone1987/claude-a-dev-team --plugin shopware-testingProvides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.