grep-for-mock-module-across-the-entire-test-file-and-confirm-eve

Validate mock.module calls in Vitest-to-Bun migrated test files.

437|45|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/ZaxbyHub/opencode-swarm --skill grep-for-mock-module-across-the-entire-test-file-and-confirm-eve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grep-for-mock-module-across-the-entire-test-file-and-confirm-eve
Source: https://github.com/ZaxbyHub/opencode-swarm/tree/main/.opencode/skills/generated/grep-for-mock-module-across-the-entire-test-file-and-confirm-eve
Command: npx skills add https://github.com/ZaxbyHub/opencode-swarm --skill grep-for-mock-module-across-the-entire-test-file-and-confirm-eve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When migrating test files from Vitest to Bun, unconverted or incorrectly modified mock.module calls can cause broken mocks and failing tests after migration, making it easy to miss errors during manual review.

Core Features & Use Cases

  • Full File Scanning: Greps the entire test file to catch every mock.module occurrence, not just visible snippets.
  • Pattern Validation: Confirms each mock.module call uses the required spread-real-exports pattern to ensure compatibility with Bun's test runner.
  • Use Case: Use this skill as part of your Vitest to Bun migration workflow to validate test files before marking them as fully converted, avoiding post-migration test failures.

Quick Start

Use this skill to scan all test files in your project for mock.module calls and confirm every occurrence uses spread-real-exports before marking your Vitest to Bun migration complete.

Frequently Asked Questions about grep-for-mock-module-across-the-entire-test-file-and-confirm-eve

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate mock.module calls when migrating tests from Vitest to Bun?

To validate mock.module calls during Vitest to Bun migration, scan your test files to confirm every occurrence uses the spread-real-exports pattern. This prevents broken mocks and failing tests after migration.

Why does mock.module break after migrating to the Bun test runner?

mock.module breaks after migrating to Bun when test files contain unconverted or incorrectly modified calls. Validating that each call implements spread-real-exports ensures compatibility with Bun's test runner.

What is the spread-real-exports pattern for mock.module in Bun tests?

The spread-real-exports pattern for mock.module ensures that mocked modules retain their original export structure during Vitest to Bun migration. Scanning test files confirms every call uses this required pattern.

How do I check an entire test file for unconverted mock.module calls?

To check an entire test file for unconverted mock.module calls, grep the full document rather than visible snippets. This full file scanning catches every occurrence to validate before marking migration complete.

Can I use this validation for test files that have no mock.module calls?

This validation targets test files requiring mock.module conversion during Vitest to Bun migration. Files without mock.module calls do not require this spread-real-exports pattern validation step.

When do I need to validate mock.module patterns in my test migration workflow?

Validate mock.module patterns in your test migration workflow before marking Vitest to Bun conversion complete. Running this check prevents post-migration test failures caused by broken mocks.