make:vue:test ​
Create a Vitest/Jest test file for a Vue feature or component
Signature: modularous:make:vue:test
Aliases: modularous:create:vue:test, mod:c:vue:test
Category: Make
Description ​
Scaffolds a Vitest or Jest test file via VueTestGenerator. Both the test name and type are prompted interactively if omitted. Multiple test types are supported (component, composable, utility, store). Use --importDir to target a subdirectory when the import path differs from the default.
Usage ​
modularous:make:vue:test [options] [<name>] [<type>]Arguments ​
| Argument | Required | Description |
|---|---|---|
name | no | Test name (prompted if omitted) |
type | no | Test type: component, composable, utility, store, etc. (prompted if omitted) |
Options ​
| Option | Short | Description |
|---|---|---|
--importDir | Subdirectory path used in the import statement | |
--force | -F | Overwrite existing test file |
Examples ​
Fully interactive ​
bash
php artisan modularous:make:vue:test
# Prompts: test name, test typeComponent test with explicit name ​
bash
php artisan modularous:make:vue:test VInputColorPicker componentComposable test ​
bash
php artisan modularous:make:vue:test UseTagSelector composableComponent from a subdirectory ​
bash
php artisan modularous:make:vue:test VInputColorPicker component --importDir=inputsNotes ​
- The generated file path and import statement depend on the test
typeand the optional--importDir. - Run this after
make:vue:inputto immediately scaffold the corresponding test file. make:featurecan trigger this automatically during the feature wizard.
See also ​
- make:vue:input — create the Vue component being tested
- make:laravel:test — create a PHPUnit test instead
- make:feature — wizard that optionally creates both
- System Reference