From 278aafd5d70c45d8624fe603749e54f77706f845 Mon Sep 17 00:00:00 2001 From: vindard <17693119+vindard@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:23:47 -0400 Subject: [PATCH] build: add option to filter jest tests --- toolchains/workspace-pnpm/run_npm_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolchains/workspace-pnpm/run_npm_test.py b/toolchains/workspace-pnpm/run_npm_test.py index df553605ea..1c7714db0d 100644 --- a/toolchains/workspace-pnpm/run_npm_test.py +++ b/toolchains/workspace-pnpm/run_npm_test.py @@ -50,10 +50,14 @@ def merge_env_from_file(file_path): ) args = parser.parse_args() + + env = merge_env_from_file(args.env_file) + bin_args = args.args[1:] # ignore '--' separator + if env.get("TEST"): + bin_args.append(env.get("TEST")) cmd = [os.path.abspath(args.bin), *bin_args] - env = merge_env_from_file(args.env_file) exit_code = subprocess.call(cmd, cwd=args.cwd, env=env) sys.exit(exit_code)