stdlib/bats: implemented integration tests

Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
This commit is contained in:
Sam Alba
2021-12-13 16:12:29 -08:00
parent 56dab104ca
commit c310a1bcdb
7 changed files with 96 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
package main
import (
"alpha.dagger.io/bats"
)
TestBats: bats.#Bats

View File

@@ -0,0 +1,37 @@
{
"name": "npm",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"bats-assert": "^2.0.0",
"bats-support": "^0.2.0"
}
},
"node_modules/bats-assert": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/bats-assert/-/bats-assert-2.0.0.tgz",
"integrity": "sha512-qO3kNilWxW8iCONu9NDUfvsCiC6JzL6DPOc/DGq9z3bZ9/A7wURJ+FnFMxGbofOmWbCoy7pVhofn0o47A95qkQ==",
"peerDependencies": {
"bats-support": "git+https://github.com/ztombol/bats-support.git#v0.2.0"
}
},
"node_modules/bats-support": {
"version": "0.2.0",
"resolved": "git+ssh://git@github.com/ztombol/bats-support.git#d0a131831c487a1f1141e76d3ab386c89642cdff"
}
},
"dependencies": {
"bats-assert": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/bats-assert/-/bats-assert-2.0.0.tgz",
"integrity": "sha512-qO3kNilWxW8iCONu9NDUfvsCiC6JzL6DPOc/DGq9z3bZ9/A7wURJ+FnFMxGbofOmWbCoy7pVhofn0o47A95qkQ==",
"requires": {}
},
"bats-support": {
"version": "git+ssh://git@github.com/ztombol/bats-support.git#d0a131831c487a1f1141e76d3ab386c89642cdff",
"from": "bats-support@*"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"dependencies": {
"bats-assert": "^2.0.0",
"bats-support": "^0.2.0"
}
}

View File

@@ -0,0 +1,12 @@
setup() {
load 'node_modules/bats-support/load'
load 'node_modules/bats-assert/load'
}
@test "simple bats test" {
run echo "Hello world"
assert_success
run cat /do/not/exist
assert_failure
}