Skip to content

Commit

Permalink
cleanups properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Idrinth committed Jul 22, 2020
1 parent d67450b commit c2c501c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/worker/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
const TIMEOUT = 6000;
const STATUS = 202;

const server = new Worker('./fixtures/server.js',);
describe('runner', () => {
it('should be a function', () => {
expect(runner,).to.be.a('function',);
Expand All @@ -21,7 +22,7 @@ describe('runner', () => {
id: 'i',
main: {
method: 'get',
url: 'http://localhost:8901',
url: 'http://localhost:8902',
cookies: {},
headers: {},
body: '',
Expand All @@ -38,7 +39,6 @@ describe('runner', () => {
},);
},).timeout(TIMEOUT,);
it('should request a page from the server', (done,) => {
const server = new Worker('./fixtures/server.js',);
runner(
{
id: 'i',
Expand All @@ -62,8 +62,9 @@ describe('runner', () => {
expect(result.response.status,).to.equal(STATUS,);
expect(result.response.uri,).to.equal('http://localhost:8901',);
expect(result.validators,).to.deep.equal([],);
server.terminate();
done();
},);
},);
},).afterAll(() => {
server.terminate();
},);

0 comments on commit c2c501c

Please sign in to comment.