title: How to refactor this redundant 'await' on a non-promise
body: <p>I'm getting an <code>Refactor this redundant 'await' on a non-promise.</code> error on SonarQube on this code:</p>
  <pre><code>async getText(): Promise&lt;string&gt; {
      const element = await $(header.content);
      return await element.getText();
  }
  </code></pre>
  <p>For this line <code>await $(locators.content)</code></p>
  <p>How can I solve this?</p>
  <p>The solution on SonarQube is using something like:</p>
  <pre><code>let x = new Promise(resolve =&gt; resolve(42));
  await x;
  
  let y = p ? 42 : new Promise(resolve =&gt; resolve(42));
  await y;
  </code></pre>
  <p>Tried to add the <code>$(locators.content)</code> inside a let or const but that didn't work.</p>