Skip to content

secondsky/claude-skills / plugins/nuxt-v4/skills/nuxt-production

nuxt-production

Verified

| Nuxt 4 production optimization: hydration, performance, testing with Vitest, deployment to Cloudflare/Vercel/Netlify, and v4 migration. Use when: debugging hydration mismatches, optimizing performance and Core Web Vitals, writing tests with Vitest, deploying to Cloudflare Pages/Workers/Vercel/Netlify, or migrating from Nuxt 3 to Nuxt 4.

templates/tests/components/BlogPost.test.ts

View on GitHub
import { describe, it, expect } from 'vitest'
import { mountSuspended } from '@nuxt/test-utils/runtime'
import BlogPost from '~/components/BlogPost.vue'

describe('BlogPost', () => {
  const mockPost = {
    id: '1',
    title: 'Test Post',
    excerpt: 'This is a test post',
    content: 'Full content here',
    author: 'John Doe',
    createdAt: new Date('2025-01-01')
  }

  it('renders post title', async () => {
    const wrapper = await mountSuspended(BlogPost, {
      props: { post: mockPost }
    })

    expect(wrapper.text()).toContain('Test Post')
  })

  it('renders post excerpt', async () => {
    const wrapper = await mountSuspended(BlogPost, {
      props: { post: mockPost }
    })

    expect(wrapper.text()).toContain('This is a test post')
  })

  it('renders author name', async () => {
    const wrapper = await mountSuspended(BlogPost, {
      props: { post: mockPost }
    })

    expect(wrapper.text()).toContain('John Doe')
  })

  it('emits click event when clicked', async () => {
    const wrapper = await mountSuspended(BlogPost, {
      props: { post: mockPost }
    })

    await wrapper.trigger('click')

    expect(wrapper.emitted('click')).toBeTruthy()
  })
})
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall