blob: 2a971b99d9dab14bc0735edb4698088028bcb48a [file]
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//macro:mocha.bzl", "mocha_test")
# Link all direct dependencies in /macro/package.json to
# bazel-bin/macro/node_modules
npm_link_all_packages()
mocha_test(
name = "test_js",
srcs = ["test.js"],
)
mocha_test(
name = "test_cjs",
srcs = ["test.cjs"],
)
mocha_test(
name = "test_esm",
srcs = ["test.mjs"],
)
mocha_test(
name = "test_all",
srcs = glob(["test.*js"]),
)
bzl_library(
name = "mocha",
srcs = ["mocha.bzl"],
deps = [
"@bazel_lib//lib:copy_to_bin",
# this is a bzl_library target, exposing the package_json.bzl file we depend on
"@npm//macro:mocha_bzl_library",
],
)