diff --git a/test/spec/sanity-checks.js b/test/spec/sanity-checks.js index d377806355..397087bc32 100644 --- a/test/spec/sanity-checks.js +++ b/test/spec/sanity-checks.js @@ -1,20 +1,14 @@ -/* global describe, it, before */ +/* eslint-env mocha */ var request = require('supertest') -var assert = require('assert') +var app = require('../../server.js') var path = require('path') var fs = require('fs') +var assert = require('assert') /** * Basic sanity checks on the dev server */ describe('The prototype kit', function () { - var app - - before(function (done) { - app = require('../../server') - done() - }) - it('should generate assets into the /public folder', function () { assert.doesNotThrow(function () { fs.accessSync(path.resolve(__dirname, '../../public/javascripts/application.js')) @@ -27,6 +21,13 @@ describe('The prototype kit', function () { request(app) .get('/') .expect('Content-Type', /text\/html/) - .expect(200, done) + .expect(200) + .end(function (err, res) { + if (err) { + done(err) + } else { + done() + } + }) }) })