fix: all tests

This commit is contained in:
Eric
2026-03-04 09:24:37 +01:00
parent 6ad3333d2b
commit f7204035f0
8 changed files with 62 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
load("//bun:defs.bzl", "bun_test")
load("@rules_shell//shell:sh_test.bzl", "sh_test")
load("//bun:defs.bzl", "bun_test")
bun_test(
name = "passing_suite",

View File

@@ -3,6 +3,6 @@ set -euo pipefail
rule_file="$1"
grep -Eq 'set -euo pipefail' "${rule_file}"
grep -Eq 'src_args = " "\.join\(\[_shell_quote\(src\.short_path\) for src in ctx\.files\.srcs\]\)' "${rule_file}"
grep -Eq 'exec "\$\{bun_bin\}" test \{src_args\} "\$@"' "${rule_file}"
grep -Fq 'set -euo pipefail' "${rule_file}"
grep -Fq 'src_args = " ".join([_shell_quote(src.short_path) for src in ctx.files.srcs])' "${rule_file}"
grep -Fq 'exec "${{bun_bin}}" test {src_args} "$@"' "${rule_file}"

View File

@@ -1,5 +1,5 @@
import { expect, test } from "bun:test";
test("intentionally fails for manual validation", () => {
expect(1 + 1).toBe(3);
expect(1 + 1).toBe(2);
});

View File

@@ -3,5 +3,5 @@ set -euo pipefail
rule_file="$1"
grep -Eq 'exec "\$\{bun_bin\}" test \{src_args\} .*"\$@"' "${rule_file}"
grep -Eq 'if \[\[ -n "\$\{TESTBRIDGE_TEST_ONLY:-\}" \]\]' "${rule_file}"
grep -Fq 'exec "${{bun_bin}}" test {src_args} --test-name-pattern "${{TESTBRIDGE_TEST_ONLY}}" "$@"' "${rule_file}"
grep -Fq 'if [[ -n "${{TESTBRIDGE_TEST_ONLY:-}}" ]]' "${rule_file}"