vitest
No long description provided.
Installation
dagger install github.com/dagger/vitest@0f0801baba25728292b0411cb14cb2214327b3a7Entrypoint
Return Type
Vitest !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| baseImageAddress | String | - | The base image to use. |
| packageManager | String | - | The package manager to use. |
Example
dagger -m github.com/dagger/vitest@0f0801baba25728292b0411cb14cb2214327b3a7 call \
func (m *MyModule) Example() *dagger.Vitest {
return dag.
Vitest()
}@function
def example() -> dagger.Vitest:
return (
dag.vitest()
)@func()
example(): Vitest {
return dag
.vitest()
}Types
Vitest 🔗
Toolchain to execute Vitest tests
baseImageAddress() 🔗
The base image to use.
Return Type
String ! Example
dagger -m github.com/dagger/vitest@0f0801baba25728292b0411cb14cb2214327b3a7 call \
base-image-addressfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Vitest().
Baseimageaddress(ctx)
}@function
async def example() -> str:
return await (
dag.vitest()
.baseimageaddress()
)@func()
async example(): Promise<string> {
return dag
.vitest()
.baseImageAddress()
}packageManager() 🔗
The package manager to use.
Return Type
String ! Example
dagger -m github.com/dagger/vitest@0f0801baba25728292b0411cb14cb2214327b3a7 call \
package-managerfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Vitest().
Packagemanager(ctx)
}@function
async def example() -> str:
return await (
dag.vitest()
.packagemanager()
)@func()
async example(): Promise<string> {
return dag
.vitest()
.packageManager()
}projects() 🔗
The Vitest projects visible from the client’s cwd: every project at or below it, plus the nearest enclosing project when the cwd holds no config of its own. Paths are cwd-relative, so a “..” prefix marks an enclosing project.
Return Type
[String ! ] !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) []string {
return dag.
Vitest().
Projects(ctx)
}@function
async def example() -> List[str]:
return await (
dag.vitest()
.projects()
)@func()
async example(): Promise<string[]> {
return dag
.vitest()
.projects()
}testAll() 🔗
Execute the tests of every project visible from the client’s cwd. A cwd that holds no config of its own sits inside its enclosing project, so that project runs too; enter a subproject to run it alone.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| build | Boolean | - | Run build before test |
| flags | [String ! ] | - | Flags to pass to vitest |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) {
return dag.
Vitest().
Testall(ctx)
}@function
async def example() -> None:
return await (
dag.vitest()
.testall()
)@func()
async example(): Promise<void> {
return dag
.vitest()
.testAll()
}test() 🔗
Execute the tests of a single project
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| path | String | - | Path of the project to test, relative to the client’s cwd |
| files | [String ! ] | - | List of files to test |
| build | Boolean | - | Run build before test |
| flags | [String ! ] | - | Flags to pass to vitest |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) {
return dag.
Vitest().
Test(ctx)
}@function
async def example() -> None:
return await (
dag.vitest()
.test()
)@func()
async example(): Promise<void> {
return dag
.vitest()
.test()
}list() 🔗
List the tests of a single project
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| path | String | - | Path of the project to list, relative to the client’s cwd |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) string {
return dag.
Vitest().
List(ctx)
}@function
async def example() -> str:
return await (
dag.vitest()
.list()
)@func()
async example(): Promise<string> {
return dag
.vitest()
.list()
}source() 🔗
The source directory of a project, relative to the client’s cwd
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ws | Workspace | - | No description provided |
| path | String | - | Path of the project, relative to the client’s cwd |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example() *dagger.Directory {
return dag.
Vitest().
Source()
}@function
def example() -> dagger.Directory:
return (
dag.vitest()
.source()
)@func()
example(): Directory {
return dag
.vitest()
.source()
}