Files
rules_bun/tests/js_compat_test/BUILD.bazel
eric b35f03872c
Some checks failed
CI / test (ubuntu-latest, linux-x64) (pull_request) Failing after 32s
CI / test (macos-14, darwin-arm64) (pull_request) Has been cancelled
CI / test (windows-latest, windows) (pull_request) Has been cancelled
test: add more tests
2026-03-15 00:59:58 +01:00

69 lines
1.5 KiB
Python

load("//js:defs.bzl", "js_binary", "js_run_devserver", "js_test", "ts_library")
load("@rules_shell//shell:sh_test.bzl", "sh_test")
ts_library(
name = "helper_lib",
srcs = ["helper.ts"],
data = ["payload.txt"],
)
js_binary(
name = "compat_bin",
entry_point = "main.ts",
deps = [":helper_lib"],
args = ["compat-mode"],
)
sh_test(
name = "js_binary_compat_test",
srcs = ["run_binary.sh"],
args = ["$(location :compat_bin)"],
data = [":compat_bin"],
)
js_test(
name = "compat_suite",
entry_point = "app.test.ts",
deps = [":helper_lib"],
)
js_run_devserver(
name = "compat_devserver",
tool = ":compat_bin",
args = ["devserver-mode"],
)
sh_test(
name = "js_run_devserver_compat_test",
srcs = ["run_devserver.sh"],
args = ["$(location :compat_devserver)"],
data = [":compat_devserver"],
)
js_run_devserver(
name = "compat_devserver_with_package_json",
tool = ":compat_bin",
package_json = "app/package.json",
working_dir = "package",
)
js_run_devserver(
name = "compat_devserver_with_package_dir_hint",
tool = ":compat_bin",
package_dir_hint = "app",
working_dir = "package",
)
sh_test(
name = "js_run_devserver_workspace_shape_test",
srcs = ["verify_workspace_shape.sh"],
args = [
"$(location :compat_devserver_with_package_json)",
"$(location :compat_devserver_with_package_dir_hint)",
],
data = [
":compat_devserver_with_package_json",
":compat_devserver_with_package_dir_hint",
],
)