Optim: move server tests scripts to test/server folder

This commit is contained in:
2015-08-24 10:31:23 +00:00
parent fecf0ea768
commit 695fc03f67
5 changed files with 7 additions and 7 deletions

23
test/server/server.js Normal file
View File

@@ -0,0 +1,23 @@
var should = require('should'),
request = require('supertest'),
app = require('../../server.js'),
globalServer;
describe('Static resources', function(){
before(function () {
globalServer = app.listen();
});
after(function () {
globalServer.close();
});
it('should send index.html', function(done){
request(globalServer)
.get('/')
.set('Accept', 'text/html')
.expect('Content-Type', /html/)
.expect(200, done);
})
})