From 84e0164096ed30ec0e8d17853e87f7755b16393b Mon Sep 17 00:00:00 2001 From: Jason Bedard Date: Thu, 27 Jun 2024 15:18:18 -0700 Subject: [PATCH] test: verify outputs of examples/out_dir test (#633) --- examples/out_dir/BUILD.bazel | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/examples/out_dir/BUILD.bazel b/examples/out_dir/BUILD.bazel index 4e7793d1..01e1c538 100644 --- a/examples/out_dir/BUILD.bazel +++ b/examples/out_dir/BUILD.bazel @@ -1,4 +1,5 @@ load("@aspect_rules_ts//ts:defs.bzl", "ts_project") +load("@bazel_skylib//rules:build_test.bzl", "build_test") ts_project( name = "out_dir-tsconfig", @@ -30,3 +31,26 @@ ts_project( out_dir = "declaration_dir", tsconfig = {}, ) + +build_test( + name = "test", + targets = [ + # outputs specified by the tsconfig attr + ":out_dir-tsconfig", + "tsconfig/main.js", + "tsconfig/main.d.ts", + "tsconfig/main.d.ts.map", + + # outputs specified by the ts_project attrs + ":out_dir-params", + "param/main.js", + "param/main.d.ts", + "param/main.d.ts.map", + + # outptus specified with out_dir *and* declaration_dir + ":out_dir-declaration_dir", + "declaration_dir/main.js", + "decl_map/main.d.ts", + "decl_map/main.d.ts.map", + ], +)