title: If statement in Postman tests
body: <p>I work in Postman and I want to build the test construction like that:</p>
  <pre><code>var login_status = pm.environment.get(&quot;LOGIN_STATUS&quot;);
  var jsonData = pm.response.json();
  pm.test(&quot;TESTS&quot;, function () {
      if (login_status === 1) {
          pm.expect...(test 1);
      }else if (login_status === 2) {
                  pm.expect...(test 2);
      }else if (login_status === 3) {
                  pm.expect...(test 3);
  </code></pre>
  <p>but it doesn't work for me as I want.</p>
  <p>In my logic, Postman should check the login status and use only one pm.expect... accordingly to login_status value.</p>
  <p>How can I use the if statement in Postman?</p>