anki/ts/html-filter/BUILD.bazel
Damien Elmes f2029b8ba8 support jsdom tests
Alternative would be to switch to jsdom for everything, but TextEncoder
is currently missing from jsdom, and jsdom mode is slower IIRC.
2021-06-19 09:43:09 +10:00

43 lines
707 B
Python

load("@npm//@bazel/typescript:index.bzl", "ts_library")
load("//ts:jest.bzl", "jest_test")
load("//ts:prettier.bzl", "prettier_test")
load("//ts:eslint.bzl", "eslint_test")
ts_library(
name = "html-filter",
srcs = glob(
["*.ts"],
exclude = ["*.test.ts"],
),
module_name = "html-filter",
tsconfig = "//ts:tsconfig.json",
visibility = ["//visibility:public"],
deps = [],
)
jest_test(
env = "jsdom",
deps = [
"html-filter",
],
)
# Tests
################
prettier_test(
name = "format_check",
srcs = glob([
"*.ts",
]),
)
eslint_test(
name = "eslint",
srcs = glob(
[
"*.ts",
],
),
)