Move tests plan from dagger dir to universe
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
11
stdlib/js/yarn/tests/testdata/package.json
vendored
Normal file
11
stdlib/js/yarn/tests/testdata/package.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "test",
|
||||
"main": "index.js",
|
||||
"license": {
|
||||
"type": "Apache-2.0",
|
||||
"url": "https://opensource.org/licenses/apache2.0.php"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "mkdir -p ./build && echo output > ./build/test && touch .env && cp .env ./build/"
|
||||
}
|
||||
}
|
25
stdlib/js/yarn/tests/yarn.cue
Normal file
25
stdlib/js/yarn/tests/yarn.cue
Normal file
@@ -0,0 +1,25 @@
|
||||
package yarn
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/alpine"
|
||||
"dagger.io/os"
|
||||
)
|
||||
|
||||
TestData: dagger.#Artifact
|
||||
|
||||
TestReact: {
|
||||
pkg: #Package & {
|
||||
source: TestData
|
||||
}
|
||||
|
||||
test: os.#Container & {
|
||||
image: alpine.#Image & {
|
||||
package: bash: "=5.1.0-r0"
|
||||
}
|
||||
mount: "/build": from: pkg.build
|
||||
command: """
|
||||
test "$(cat /build/test)" = "output"
|
||||
"""
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user