load("//:build/wd_ts_project.bzl", "wd_ts_project") load("//:build/wpt_test.bzl", "wpt_test") srcs = glob( [ "**/*.ts", ], ) filegroup( name = "harness@js", srcs = [file.removesuffix(".ts") + ".js" for file in glob(["harness/*.ts"])], ) wd_ts_project( name = "wpt-all@tsproject", srcs = srcs, eslintrc_json = "eslint.config.mjs", source_map = False, tsconfig_json = "tsconfig.json", deps = [ "//:node_modules/@types/node", ], ) wpt_test( name = "url", config = "url-test.ts", wpt_directory = "@wpt//:url@module", ) wpt_test( name = "urlpattern", # We use a fixed compat date because new URLPattern implementation # will be the default one on a later date. compat_date = "2025-04-09", config = "urlpattern-test.ts", wpt_directory = "@wpt//:urlpattern@module", ) wpt_test( name = "urlpattern-standard", config = "urlpattern-standard-test.ts", wpt_directory = "@wpt//:urlpattern@module", ) wpt_test( name = "dom/abort", config = "dom/abort-test.ts", wpt_directory = "@wpt//:dom/abort@module", ) wpt_test( name = "dom/events", config = "dom/events-test.ts", wpt_directory = "@wpt//:dom/events@module", ) wpt_test( name = "fetch/api", size = "large", compat_flags = ["strip_bom_in_read_all_text"], config = "fetch/api-test.ts", start_server = True, target_compatible_with = select({ # TODO(later): Provide a Windows version of the sidecar script we wrote to invoke wptserve. # Currently we only have a Unix shell script. "@platforms//os:windows": ["@platforms//:incompatible"], "//conditions:default": [], }), wpt_directory = "@wpt//:fetch/api@module", ) wpt_test( name = "encoding", size = "large", compat_flags = [ "encoder_stream_spec_compliant_backpressure", "fixup-transform-stream-backpressure", "text_decoder_cjk_decoder", "transformstream_enable_standard_constructor", ], config = "encoding-test.ts", wpt_directory = "@wpt//:encoding@module", ) wpt_test( name = "compression", config = "compression-test.ts", start_server = True, target_compatible_with = select({ "@platforms//os:windows": ["@platforms//:incompatible"], "//conditions:default": [], }), wpt_directory = "@wpt//:compression@module", ) wpt_test( name = "WebCryptoAPI", size = "enormous", compat_flags = ["disable_fast_jsg_struct"], config = "WebCryptoAPI-test.ts", target_compatible_with = select({ # Too slow on Windows "@platforms//os:windows": ["@platforms//:incompatible"], "//conditions:default": [], }), wpt_directory = "@wpt//:WebCryptoAPI@module", ) wpt_test( name = "streams", size = "large", compat_flags = ["writable_stream_spec_compliant_writer"], config = "streams-test.ts", wpt_directory = "@wpt//:streams@module", ) wpt_test( name = "fs", size = "large", compat_flags = ["enable_web_file_system"], config = "fs-test.ts", wpt_directory = "@wpt//:fs@module", ) wpt_test( name = "performance-timeline", config = "performance-timeline-test.ts", wpt_directory = "@wpt//:performance-timeline@module", ) wpt_test( name = "websockets", size = "large", compat_flags = [ "websocket_standard_binary_type", "web_socket_auto_reply_to_close", ], config = "websockets-test.ts", start_server = True, target_compatible_with = select({ # TODO(later): Provide a Windows version of the sidecar script we wrote to invoke wptserve. # Currently we only have a Unix shell script. "@platforms//os:windows": ["@platforms//:incompatible"], "//conditions:default": [], }), wpt_directory = "@wpt//:websockets@module", ) wpt_test( name = "eventsource", size = "large", config = "eventsource-test.ts", start_server = True, target_compatible_with = select({ # TODO(later): Provide a Windows version of the sidecar script we wrote to invoke wptserve. # Currently we only have a Unix shell script. "@platforms//os:windows": ["@platforms//:incompatible"], "//conditions:default": [], }), wpt_directory = "@wpt//:eventsource@module", ) wpt_test( name = "webidl", config = "webidl-test.ts", wpt_directory = "@wpt//:webidl@module", )