Back to Skills

writing-bundler-tests

Guides writing bundler tests using itBundled/expectBundled in test/bundler/. Use when creating or modifying bundler, transpiler, or code transformation tests.

86,280stars3,930forksUpdated 1/14/2026

Security Assessment

Safe(100/100)
Security Score100/100

About writing-bundler-tests

The 'writing-bundler-tests' skill is designed to assist developers in creating and modifying tests for bundlers, transpilers, or code transformation tools using Bun's testing framework. By leveraging the itBundled() function from the expectBundled module, users can ensure that their bundler behaves as expected under various conditions, providing a systematic approach to testing complex code transformations. This skill addresses the need for reliable and consistent testing methodologies within JavaScript environments, particularly when working with modern bundling techniques.

FAQ

How do I set up a basic bundler test?

You can set up a basic test using the itBundled() method by defining a category and test name, along with the files and expected output.

What types of output verification are supported?

The skill supports exact matches, pattern matches using regex, substring checks, and verification of standard error outputs.

Are there any specific requirements for running these tests?

Tests should be executed using the Bun test framework, and the necessary bundler files should be correctly structured in the test directory.

Install writing-bundler-tests

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

oven-sh/bun