vendredi 4 septembre 2015

Mocha test timing out

My mocha test doesn't seem to stop once the done call is called. I'm kinda stumped as it looks pretty much identical to everything I can find online.

This is the entirety of the test.js file.

var request = require('supertest');
var app = require('../app.js');

describe('GET /', function() {
  it('Should be status code 200', function(done) {
    request(app).get('/').expect(200, done);
  });
});

I get this output

Node app is running on port 4000 GET / ✓ Should be status code 200 (141ms)

1) "after all" hook for "Should be status code 200"

1 passing (2s) 1 failing

1) "after all" hook for "Should be status code 200": Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test

.

Aucun commentaire:

Enregistrer un commentaire