mapbox / mapbox/mapbox-agent-skills
Add skill: mapbox-testing-patterns
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 78
- Forks
- 17
- Avg merge
- 4h 39m
- Merged PRs (30d)
- 3
Description
## Summary
Testing Mapbox applications is a gap with no existing skill. AI assistants don't know how to mock the map, assert layer state, or set up CI/CD for style validation. This leads to untested map code or brittle tests that depend on live network calls.
## Topics to cover
- **Unit testing** - mocking `mapboxgl.Map` in Jest/Vitest, testing layer/source logic without rendering
- **Integration testing** - headless map rendering in CI (Playwright, Puppeteer), asserting visual state
- **iOS testing** - XCTest patterns for map views, mocking map delegates
- **Android testing** - Espresso/Compose UI test patterns for map views
- **Style CI/CD** - running `validate_style_tool` and `check_color_contrast_tool` in CI pipelines
- **Snapshot testing** - capturing and diffing map renders across style changes
## Key patterns a skill should teach
- How to mock `mapboxgl.Map` without breaking the module graph
- What to assert vs. what to trust the SDK to handle
- Setting up a headless Chromium environment for map screenshot tests
- When to use the MCP DevKit validation tools in CI vs. manual review
## Why this matters
Map code often goes untested because developers don't know how to approach it. A skill here would meaningfully improve code quality across the ecosystem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by defining the scope of the mapbox-testing-patterns skill around the listed unit, integration, iOS, Android, CI/CD, and snapshot topics. Research mocking mapboxgl.Map, headless Playwright or Puppeteer rendering, XCTest and Espresso patterns, and the named validation tools. Done means the skill covers each requested testing pattern with actionable guidance and CI considerations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, playwright
- Domain
- devops, documentation, mobile-dev, testing-qa
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100