From 9f44242baef90957a98365155854b8c88b9a1d4d Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 5 Apr 2023 14:33:12 -0700 Subject: [PATCH] fix: env is valid for js_test and js_run_binary --- jest/defs.bzl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jest/defs.bzl b/jest/defs.bzl index 4d30694..37e435c 100644 --- a/jest/defs.bzl +++ b/jest/defs.bzl @@ -232,12 +232,15 @@ def jest_test( if update_snapshots_mode: gen_snapshots_bin = "{}_ref_snapshots_bin".format(name) - # Filter out named params that only apply to *_test rules. + # Filter out named params that are valid for jest_test but not for jest_binary bin_kwargs = { key: val for key, val in kwargs.items() - # List from https://bazel.build/reference/be/common-definitions#common-attributes-tests - if key not in ["flaky", "shard_count", "local", "env", "env_inherit"] + # Subset of list from https://bazel.build/reference/be/common-definitions#common-attributes-tests + # - "env" is supported by *_binary rules so not filtered out + # - "args" are supported by *_binary rules so not filtered out + # - "size", "timeout" are explicit parameters to the macro so not in kwargs + if key not in ["env_inherit", "flaky", "shard_count", "local"] } # This is the generated reference snapshot generator binary target that is used as the