stdlib: dagger.io/js/react
Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
39
tests/stdlib/js/react/react.cue
Normal file
39
tests/stdlib/js/react/react.cue
Normal file
@@ -0,0 +1,39 @@
|
||||
package react
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/js/react"
|
||||
"dagger.io/alpine"
|
||||
"dagger.io/docker"
|
||||
)
|
||||
|
||||
TestData: dagger.#Artifact
|
||||
|
||||
TestReact: {
|
||||
app: react.#App & {
|
||||
source: TestData
|
||||
}
|
||||
|
||||
test: docker.#Container & {
|
||||
image: alpine.#Image & {
|
||||
package: bash: "=5.1.0-r0"
|
||||
}
|
||||
volume: build: {
|
||||
from: app.build
|
||||
dest: "/build"
|
||||
}
|
||||
command: """
|
||||
test "$(cat /build/test)" = "output"
|
||||
"""
|
||||
shell: {
|
||||
path: "/bin/bash"
|
||||
args: [
|
||||
"--noprofile",
|
||||
"--norc",
|
||||
"-eo",
|
||||
"pipefail",
|
||||
"-c",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,36 +0,0 @@
|
||||
package yarn
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/yarn"
|
||||
"dagger.io/alpine"
|
||||
"dagger.io/dagger/op"
|
||||
)
|
||||
|
||||
TestData: dagger.#Artifact
|
||||
|
||||
TestYarn: {
|
||||
run: yarn.#Script & {
|
||||
source: TestData
|
||||
}
|
||||
|
||||
test: #up: [
|
||||
op.#Load & {from: alpine.#Image & {
|
||||
package: bash: "=5.1.0-r0"
|
||||
}},
|
||||
op.#Exec & {
|
||||
mount: "/build": from: run
|
||||
args: [
|
||||
"/bin/bash",
|
||||
"--noprofile",
|
||||
"--norc",
|
||||
"-eo",
|
||||
"pipefail",
|
||||
"-c",
|
||||
"""
|
||||
test "$(cat /build/test)" = "output"
|
||||
""",
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
@@ -9,8 +9,8 @@ test::stdlib(){
|
||||
|
||||
test::one "stdlib: alpine" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/stdlib/alpine
|
||||
test::one "stdlib: yarn" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/stdlib/yarn --input-dir TestData="$d"/stdlib/yarn/testdata
|
||||
test::one "stdlib: react" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/stdlib/js/react --input-dir TestData="$d"/stdlib/js/react/testdata
|
||||
test::one "stdlib: go" \
|
||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/stdlib/go --input-dir TestData="$d"/stdlib/go/testdata
|
||||
test::one "stdlib: file" \
|
||||
|
Reference in New Issue
Block a user