mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00

- templated_args was missing --node_modules= prefix, and was causing tests to pass unconditionally - update to beta of jest 27, which introduces an option to fix the symlink handling, and is approx twice as fast to start up
62 lines
1.1 KiB
Text
62 lines
1.1 KiB
Text
load("@npm//@bazel/typescript:index.bzl", "ts_library")
|
|
load("@npm//jest-cli:index.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 = [],
|
|
)
|
|
|
|
ts_library(
|
|
name = "test_lib",
|
|
srcs = glob(["*.test.ts"]),
|
|
tsconfig = "//ts:tsconfig.json",
|
|
deps = [
|
|
"html-filter",
|
|
"@npm//@types/jest",
|
|
],
|
|
)
|
|
|
|
jest_test(
|
|
name = "test",
|
|
args = [
|
|
"--no-cache",
|
|
"--no-watchman",
|
|
"--ci",
|
|
"--colors",
|
|
"--config",
|
|
"$(location //ts:jest.config.js)",
|
|
],
|
|
data = [
|
|
":test_lib",
|
|
"//ts:jest.config.js",
|
|
"//ts:package.json",
|
|
],
|
|
)
|
|
|
|
# Tests
|
|
################
|
|
|
|
prettier_test(
|
|
name = "format_check",
|
|
srcs = glob([
|
|
"*.ts",
|
|
]),
|
|
)
|
|
|
|
eslint_test(
|
|
name = "eslint",
|
|
srcs = glob(
|
|
[
|
|
"*.ts",
|
|
],
|
|
),
|
|
)
|