
const request = require('supertest');
const app = require('../../src/app');

beforeAll((done) => {
  app.on('ready', () => {
    done();
  });
});

//------------------------------------------------------------
//                     404 Test
//------------------------------------------------------------

test('It should return 404 error', () => {
  return request(app).get('/v1').then((response) => {
    expect(response.statusCode).toBe(404);
  });
});

@@ -335,16 +335,22 @@
  error',
+ async
  () =%3E %7B
@@ -352,22 +352,38 @@
  =%3E %7B%0A  
-return
+const response = await
  request
@@ -402,32 +402,10 @@
 v1')
-.then((response) =%3E %7B%0A  
+;%0A
   ex
@@ -441,18 +441,12 @@
 e(404);%0A
-  %7D);%0A
 %7D);%0A

update error test with async