cap-go avatar

Capacitor Testing

This covers the full testing stack for Capacitor apps, from unit tests with Vitest to E2E with Playwright and Appium. You get concrete examples of mocking native plugins like NativeBiometric, platform-specific test utilities, and component testing for both React and Vue. The testing pyramid approach is solid: lots of unit tests for business logic, some integration tests for component interaction, and a few E2E tests for critical flows. What's useful here is the mock setup boilerplate, which is usually the annoying part of testing Capacitor apps. If you're building a mobile app and need more than just "npm test" running a few Jest tests, this gives you the patterns to test across web and native.

skills.sh installs
216
GitHub stars
43
last updated
Jun 3, 2026

Install

$ npx -y skills add cap-go/capacitor-skills --skill capacitor-testing --agent claude-code

Installs into .claude/skills of the current project.

Files

Testing Capacitor Apps and Plugins

A Capacitor app has three layers to test: the web app (most logic), the native bridge and plugins (Swift/Kotlin), and the running app on a device. Pick the cheapest layer that can catch the bug.

When to Use

TRIGGER when:

  • Adding unit, component or E2E tests to a Capacitor app
  • Mocking Capacitor or plugin APIs in Vitest / Jest
  • Writing or modernizing native unit tests for a plugin (Swift Testing, XCTest, JUnit)
  • Verifying a change on a simulator, emulator or device ("test this", "does it work", "check on device")
  • E2E tests that cannot find web elements in the app (WebView context)
  • Setting up test jobs in CI

Do not use:

  • Reading device or crash logs: ios-android-logs
  • Safari Web Inspector / Chrome DevTools debugging: debugging-capacitor
  • Build, signing and release pipelines: capacitor-ci-cd
  • App Intents tests: capacitor-app-intents (AppIntentsTesting)

Choose the layer

Sponsors

Details

Repository
github.com/cap-go/capacitor-skills
Categories
Testing & QA, Mobile Development
First seen
Jun 3, 2026

More from cap-go/capacitor-skills

All 13
1marcelorodrigo avatarspring-boot-testingmarcelorodrigo/agent-skillsExpert Spring Boot 4 testing specialist that selects the best Spring Boot testing techniques for your situation with Junit 6 and AssertJ.215skills.sh installs
2vudovn avatarwebapp-testingvudovn/antigravity-kitwebapp testing212skills.sh installs
3akillness avatarbackend-testingakillness/oh-my-skillsbackend testing211skills.sh installs
4sickn33 avatarbats-testing-patternssickn33/antigravity-awesome-skillsbats testing patterns206skills.sh installs
5royrvd avatartesting-best-practicesroyrvd/golden-testing-rules-for-aitesting best practices204skills.sh installs
6vercel-labs avatarbenchmark-testingvercel-labs/vercel-pluginbenchmark testing193skills.sh installs