writing-bundler-tests
Guides writing bundler tests using itBundled/expectBundled in test/bundler/. Use when creating or modifying bundler, transpiler, or code transformation tests.
Security Assessment
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
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
oven-sh/bun