blob: 49c17287c386a7685a7a77625058df655d75a507 [file] [log] [blame]
Eugene Kliuchnikova6292892017-08-28 11:31:29 +02001package(
2 default_visibility = ["//visibility:public"],
3)
4
5licenses(["notice"]) # MIT
6
7load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
8
9# Not a real polyfill. Do NOT use for anything, but tests.
10closure_js_library(
11 name = "polyfill",
12 srcs = ["polyfill.js"],
Eugene Kliuchnikov42d78802017-10-09 17:07:34 +020013 suppress = [
Eugene Kliuchnikov29dc2cc2018-05-31 13:21:04 +020014 "JSC_INVALID_OPERAND_TYPE",
Eugene Kliuchnikov42d78802017-10-09 17:07:34 +020015 "JSC_MISSING_JSDOC",
Eugene Kliuchnikov29dc2cc2018-05-31 13:21:04 +020016 "JSC_STRICT_INEXISTENT_PROPERTY",
Eugene Kliuchnikov42d78802017-10-09 17:07:34 +020017 "JSC_TYPE_MISMATCH",
18 "JSC_UNKNOWN_EXPR_TYPE",
19 ],
Eugene Kliuchnikova6292892017-08-28 11:31:29 +020020)
21
22# Do NOT use this artifact; it is for test purposes only.
23closure_js_library(
24 name = "decode",
25 srcs = ["decode.js"],
Eugene Kliuchnikov42d78802017-10-09 17:07:34 +020026 suppress = [
27 "JSC_DUP_VAR_DECLARATION",
28 "JSC_USELESS_BLOCK",
29 ],
Eugene Kliuchnikova6292892017-08-28 11:31:29 +020030 deps = [":polyfill"],
31)
32
33load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_test")
34
35closure_js_test(
36 name = "all_tests",
37 srcs = ["decode_test.js"],
Eugene Kliuchnikova6292892017-08-28 11:31:29 +020038 deps = [
39 ":decode",
40 ":polyfill",
41 "@io_bazel_rules_closure//closure/library:testing",
42 ],
43)