2021-08-18 17:15:07 +00:00
|
|
|
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library", "closure_js_test")
|
|
|
|
|
2017-08-28 09:31:29 +00:00
|
|
|
package(
|
|
|
|
default_visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
licenses(["notice"]) # MIT
|
|
|
|
|
|
|
|
# Not a real polyfill. Do NOT use for anything, but tests.
|
|
|
|
closure_js_library(
|
|
|
|
name = "polyfill",
|
|
|
|
srcs = ["polyfill.js"],
|
2017-10-09 15:07:34 +00:00
|
|
|
suppress = [
|
2018-05-31 11:21:04 +00:00
|
|
|
"JSC_INVALID_OPERAND_TYPE",
|
2017-10-09 15:07:34 +00:00
|
|
|
"JSC_MISSING_JSDOC",
|
2018-05-31 11:21:04 +00:00
|
|
|
"JSC_STRICT_INEXISTENT_PROPERTY",
|
2017-10-09 15:07:34 +00:00
|
|
|
"JSC_TYPE_MISMATCH",
|
|
|
|
"JSC_UNKNOWN_EXPR_TYPE",
|
|
|
|
],
|
2017-08-28 09:31:29 +00:00
|
|
|
)
|
|
|
|
|
2023-07-05 18:49:09 +00:00
|
|
|
closure_js_library(
|
|
|
|
name = "jasmine-polyfill",
|
|
|
|
srcs = ["jasmine-polyfill.js"],
|
|
|
|
suppress = [
|
|
|
|
"JSC_MISSING_JSDOC",
|
|
|
|
"JSC_UNKNOWN_EXPR_TYPE",
|
|
|
|
"JSC_MISSING_PROVIDE",
|
|
|
|
],
|
|
|
|
deps = ["@io_bazel_rules_closure//closure/library:testing"],
|
|
|
|
testonly = True,
|
|
|
|
)
|
|
|
|
|
2017-08-28 09:31:29 +00:00
|
|
|
# Do NOT use this artifact; it is for test purposes only.
|
|
|
|
closure_js_library(
|
|
|
|
name = "decode",
|
|
|
|
srcs = ["decode.js"],
|
2021-06-23 07:40:57 +00:00
|
|
|
suppress = ["JSC_USELESS_BLOCK"],
|
2017-08-28 09:31:29 +00:00
|
|
|
deps = [":polyfill"],
|
|
|
|
)
|
|
|
|
|
|
|
|
closure_js_test(
|
2023-07-05 18:49:09 +00:00
|
|
|
name = "decode_test",
|
2017-08-28 09:31:29 +00:00
|
|
|
srcs = ["decode_test.js"],
|
2021-06-23 07:40:57 +00:00
|
|
|
entry_points = ["decode_test.js"],
|
|
|
|
suppress = ["moduleLoad"],
|
2017-08-28 09:31:29 +00:00
|
|
|
deps = [
|
|
|
|
":decode",
|
2023-07-05 18:49:09 +00:00
|
|
|
":jasmine-polyfill",
|
|
|
|
":polyfill",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
closure_js_test(
|
|
|
|
name = "decode_synth_test",
|
|
|
|
srcs = ["decode_synth_test.js"],
|
|
|
|
entry_points = ["decode_synth_test.js"],
|
|
|
|
suppress = ["moduleLoad"],
|
|
|
|
deps = [
|
|
|
|
":decode",
|
|
|
|
":jasmine-polyfill",
|
|
|
|
":polyfill",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
closure_js_library(
|
|
|
|
name = "test_data_js",
|
|
|
|
testonly = True,
|
|
|
|
srcs = ["test_data.js"],
|
|
|
|
suppress = ["lintChecks"],
|
|
|
|
)
|
|
|
|
|
|
|
|
closure_js_test(
|
|
|
|
name = "bundle_test",
|
|
|
|
srcs = ["bundle_test.js"],
|
|
|
|
entry_points = ["bundle_test.js"],
|
|
|
|
suppress = ["moduleLoad"],
|
|
|
|
deps = [
|
|
|
|
":decode",
|
|
|
|
":jasmine-polyfill",
|
2017-08-28 09:31:29 +00:00
|
|
|
":polyfill",
|
2023-07-05 18:49:09 +00:00
|
|
|
":test_data_js",
|
2017-08-28 09:31:29 +00:00
|
|
|
],
|
|
|
|
)
|