Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Writes React component tests that mock Supabase Studio API calls at the network layer with MSW.
48% 96%+48 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 11 of 23 without it.
This test ran on v2. v3 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
Mount a Studio component, intercept its network calls with MSW, assert what renders and what gets sent. The infrastructure is already wired up — this skill is the working template plus the gotchas.
/platform/..., /v1/..., or another endpoint
in apps/studio/data/api.d.ts.vi.mock('@/data/some-query', ...).
Don't. Mock the network instead — see "Why not vi.mock" below.If the component is purely presentational with no data fetching, you don't need MSW; render and assert directly.
import { screen } from '@testing-library/react'
import { platformComponents as components } from 'api-types'
import { mockAnimationsApi } from 'jsdom-testing-mocks'
import { HttpResponse } from 'msw'
import { describe, expect, test } from 'vitest'
import { MyComponent } from './MyComponent'
import { createMockOrganizationResponse } from '@/tests/helpers'
import { customRender } from '@/tests/lib/custom-render'
import { addAPIMock } from '@/tests/lib/msw'
type OrganizationResponse = components['schemas']['OrganizationResponse']
mockAnimationsApi()
describe('MyComponent', () => {
test('renders rows from the API', async () => {
addAPIMock({
method: 'get',
path: '/platform/organizations',
Next to this one in the catalogue, plus more from the same author.