| load("@npm//@bazel/typescript:index.bzl", "ts_library") |
| load("@npm//jest-cli:index.bzl", "jest_test") |
| |
| ts_library( |
| name = "test_lib", |
| srcs = glob([ |
| "**/*.ts", |
| ]), |
| deps = [ |
| "//ts/src", |
| "@npm//@types", |
| ], |
| ) |
| |
| jest_test( |
| name = "test", |
| args = [ |
| "--no-cache", |
| "--no-watchman", |
| "--ci", |
| "--colors", |
| "--config", |
| "jest.ts.config.js", |
| ], |
| data = [ |
| ":test_lib", |
| "//:jest.ts.config.js", |
| ], |
| tags = [ |
| # Need to set the pwd to avoid jest needing a runfiles helper |
| # Windows users with permissions can use --enable_runfiles |
| # to make this test work |
| "no-bazelci-windows", |
| # TODO: why does this fail almost all the time, but pass on local Mac? |
| "no-bazelci-mac", |
| ], |
| ) |