title: How to check if a Promise is pending
body: <p>I have this situation in which I would like to know what the status is of a promise. Below, the function <code>start</code> only calls <code>someTest</code> if it is not running anymore (Promise is not pending). The <code>start</code> function can be called many times, but if its called while the tests are still running, its not going to wait and returns just <code>false</code></p>
  
  <pre><code>class RunTest {
      start() {
           retVal = false;
  
           if (!this.promise) {
               this.promise = this.someTest();
               retVal = true;                
           }
  
           if ( /* if promise is resolved/rejected or not pending */ ) {
               this.promise = this.someTest();
               retVal = true;
           }
  
           return retVal;
      }
  
      someTest() {
          return new Promise((resolve, reject) =&gt; {
              // some tests go inhere
          });
      }
  }
  </code></pre>
  
  <p>I cannot find a way to simply check the status of a promise. Something like <code>this.promise.isPending</code> would be nice :) Any help would be appreciated!</p>