From a35b2520f86ba7b33c15aa9f58de38c80f7e0c03 Mon Sep 17 00:00:00 2001 From: Omer Zidkoni Date: Tue, 17 Oct 2023 09:01:15 +0300 Subject: [PATCH] CR changes --- xray_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xray_test.go b/xray_test.go index 2f345decf..8564b09e6 100644 --- a/xray_test.go +++ b/xray_test.go @@ -186,9 +186,8 @@ func TestXrayAuditYarnV1Json(t *testing.T) { func TestXrayAuditYarnV1JsonWithoutDevDependencies(t *testing.T) { assert.NoError(t, os.Setenv("NODE_ENV", "production")) - defer func() { - assert.NoError(t, os.Unsetenv("NODE_ENV")) - }() + unsetEnv := clientTestUtils.SetEnvWithCallbackAndAssert(t, "NODE_ENV", "production") + defer unsetEnv() testXrayAuditYarn(t, "yarn-v1", func() { output := runXrayAuditYarnWithOutput(t, string(utils.Json)) var results []services.ScanResponse