Nightmare JS Return Page Status Code
<p>I would like to use Nightmare JS to determine if a page is loading by checking the status code 200.  I looked at the goto options, but haven't been able to figure it out.  Anyone have any ideas?</p>

<pre><code>var Nightmare = require('nightmare');
var should = require('chai').should();

describe('PageLoad Test', function () {
var url = 'http://www.yahoo.com';
  describe('Browse Page', function () {
    it('should return 200 status', function (done) {
        this.timeout(15000);
        new Nightmare()
            .goto(url)
            .wait(1000)
            .evaluate(function () {
                return document.querySelector('div.items').innerHTML;
            })
        .then(function (element) {
            element.should.equal(element);
            done();
        })
        .catch(function (error) {
            console.error('page failed to load', error);
            done('epic failure')
        })
    });
  });
});
</code></pre>