title: Is it an antipattern to resolve a Promise with no argument just to control the flow of an app?
body: <p>If I had two independent functions that are usually called separately like below:</p>
  <pre><code>   function one() {
          axios.post('XXXX', {
             foo: foo,
          })
          .then((response) =&gt; {
              //do something;
          });
      }
  
     function two() {
         axios.post('YYYY', {
            foo: foo,
         })
         .then((response) =&gt; {
             //do something;
         });
     }
  </code></pre>
  <p>but somewhere in my code, I had another function that called both of these but the execution was important in where I need <code>two()</code> to run and finish executing before <code>one()</code> does, I realize this below is unreliable.</p>
  <pre><code>function all() {
       two();
       one();   
  }
  </code></pre>
  <p>I want to ensure the times where I call these functions together elsewhere, I get them in the correct order and that the first finishes executing before the second is called.
  Can I have rewrite the function <code>two()</code> so it will return a Promise that just <code>resolves()</code> with no argument inside of it so that it will trigger <code>one()</code> like follows:</p>
  <pre><code>function two() {
      return new Promise((resolve, reject) =&gt; {
        axios.post('YYYY', {
           foo: foo,
        })
        .then((response) =&gt; {
            //do something;
        })
        .then((response) =&gt; {
            resolve();
        });
      }      
  }
  </code></pre>