jest
No long description provided.
Installation
dagger install github.com/dagger/jest@c2beb908abe2395230cf7bc07f426f3a0fb03e76Entrypoint
Return Type
Jest !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/jest@c2beb908abe2395230cf7bc07f426f3a0fb03e76 call \
func (m *MyModule) Example() *dagger.Jest {
return dag.
Jest()
}@function
def example() -> dagger.Jest:
return (
dag.jest()
)@func()
example(): Jest {
return dag
.jest()
}Types
Jest 🔗
Toolchain to execute Jest tests
baseImageAddress() 🔗
The base image to use.
Return Type
String ! Example
dagger -m github.com/dagger/jest@c2beb908abe2395230cf7bc07f426f3a0fb03e76 call \
base-image-addressfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Jest().
Baseimageaddress(ctx)
}@function
async def example() -> str:
return await (
dag.jest()
.baseimageaddress()
)@func()
async example(): Promise<string> {
return dag
.jest()
.baseImageAddress()
}packageManager() 🔗
The package manager to use.
Return Type
String ! Example
dagger -m github.com/dagger/jest@c2beb908abe2395230cf7bc07f426f3a0fb03e76 call \
package-managerfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Jest().
Packagemanager(ctx)
}@function
async def example() -> str:
return await (
dag.jest()
.packagemanager()
)@func()
async example(): Promise<string> {
return dag
.jest()
.packageManager()
}projects() 🔗
The Jest 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.
Jest().
Projects(ctx)
}@function
async def example() -> List[str]:
return await (
dag.jest()
.projects()
)@func()
async example(): Promise<string[]> {
return dag
.jest()
.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 |
| useEnv | Boolean | - | Use jest-defined environment |
| flags | [String ! ] | - | Flags to pass to jest |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) {
return dag.
Jest().
Testall(ctx)
}@function
async def example() -> None:
return await (
dag.jest()
.testall()
)@func()
async example(): Promise<void> {
return dag
.jest()
.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 |
| useEnv | Boolean | - | Use jest-defined environment |
| flags | [String ! ] | - | Flags to pass to jest |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(ctx context.Context) {
return dag.
Jest().
Test(ctx)
}@function
async def example() -> None:
return await (
dag.jest()
.test()
)@func()
async example(): Promise<void> {
return dag
.jest()
.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.
Jest().
List(ctx)
}@function
async def example() -> str:
return await (
dag.jest()
.list()
)@func()
async example(): Promise<string> {
return dag
.jest()
.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.
Jest().
Source()
}@function
def example() -> dagger.Directory:
return (
dag.jest()
.source()
)@func()
example(): Directory {
return dag
.jest()
.source()
}