How to not run a Promise before I ask to
<p>I thought I had it all figured out regarding Promise, but this one actually throws me out of bed. When creating a new Promise with a executor taking two arguments, why is this method running before I either take then() or catch() at that promise</p>

<p>Running node 6.2.2.</p>

<pre><code>import assert = require('assert');

describe("When working with promises", () =&gt; {
    let ar = [1, 2, 3, 4, 5, 6];

    beforeEach(() =&gt; {

    })

    it("should be perfectly fine but isn't when mapping to promises", (done) =&gt; {
        ar.map(num =&gt; {
            return new Promise((resolve, reject) =&gt; {
                done(new Error('Why on earth is ' + num + ' called'));
            })
        })

        done();
    })

    it("should be perfectly fine when mapping to methods", (done) =&gt; {

        ar.map(num =&gt; {
            return (resolve, reject) =&gt; {
                done(new Error(num + ' is not called ever'));
            }
        })

        done();
    })
});
</code></pre>

<p>First test fails, and second test is successful.</p>