Home | History | Annotate | Download | only in js
      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"],
     13     suppress = [
     14         "JSC_INVALID_OPERAND_TYPE",
     15         "JSC_MISSING_JSDOC",
     16         "JSC_STRICT_INEXISTENT_PROPERTY",
     17         "JSC_TYPE_MISMATCH",
     18         "JSC_UNKNOWN_EXPR_TYPE",
     19     ],
     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"],
     26     suppress = [
     27         "JSC_DUP_VAR_DECLARATION",
     28         "JSC_USELESS_BLOCK",
     29     ],
     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"],
     38     deps = [
     39         ":decode",
     40         ":polyfill",
     41         "@io_bazel_rules_closure//closure/library:testing",
     42     ],
     43 )
     44