Eugene Kliuchnikov | a629289 | 2017-08-28 11:31:29 +0200 | [diff] [blame] | 1 | package( |
| 2 | default_visibility = ["//visibility:public"], |
| 3 | ) |
| 4 | |
| 5 | licenses(["notice"]) # MIT |
| 6 | |
| 7 | load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") |
| 8 | |
| 9 | # Not a real polyfill. Do NOT use for anything, but tests. |
| 10 | closure_js_library( |
| 11 | name = "polyfill", |
| 12 | srcs = ["polyfill.js"], |
Eugene Kliuchnikov | 42d7880 | 2017-10-09 17:07:34 +0200 | [diff] [blame] | 13 | suppress = [ |
Eugene Kliuchnikov | 29dc2cc | 2018-05-31 13:21:04 +0200 | [diff] [blame] | 14 | "JSC_INVALID_OPERAND_TYPE", |
Eugene Kliuchnikov | 42d7880 | 2017-10-09 17:07:34 +0200 | [diff] [blame] | 15 | "JSC_MISSING_JSDOC", |
Eugene Kliuchnikov | 29dc2cc | 2018-05-31 13:21:04 +0200 | [diff] [blame] | 16 | "JSC_STRICT_INEXISTENT_PROPERTY", |
Eugene Kliuchnikov | 42d7880 | 2017-10-09 17:07:34 +0200 | [diff] [blame] | 17 | "JSC_TYPE_MISMATCH", |
| 18 | "JSC_UNKNOWN_EXPR_TYPE", |
| 19 | ], |
Eugene Kliuchnikov | a629289 | 2017-08-28 11:31:29 +0200 | [diff] [blame] | 20 | ) |
| 21 | |
| 22 | # Do NOT use this artifact; it is for test purposes only. |
| 23 | closure_js_library( |
| 24 | name = "decode", |
| 25 | srcs = ["decode.js"], |
Eugene Kliuchnikov | 42d7880 | 2017-10-09 17:07:34 +0200 | [diff] [blame] | 26 | suppress = [ |
| 27 | "JSC_DUP_VAR_DECLARATION", |
| 28 | "JSC_USELESS_BLOCK", |
| 29 | ], |
Eugene Kliuchnikov | a629289 | 2017-08-28 11:31:29 +0200 | [diff] [blame] | 30 | deps = [":polyfill"], |
| 31 | ) |
| 32 | |
| 33 | load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_test") |
| 34 | |
| 35 | closure_js_test( |
| 36 | name = "all_tests", |
| 37 | srcs = ["decode_test.js"], |
Eugene Kliuchnikov | a629289 | 2017-08-28 11:31:29 +0200 | [diff] [blame] | 38 | deps = [ |
| 39 | ":decode", |
| 40 | ":polyfill", |
| 41 | "@io_bazel_rules_closure//closure/library:testing", |
| 42 | ], |
| 43 | ) |