text: const request = require('supertest');
  const faker = require('faker');
  const httpStatus = require('http-status');
  const app = require('../../src/app');
  const { User } = require('../../src/models');
  const { userOne, userTwo, admin, insertUsers } = require('../fixtures/user.fixture');
  const { userOneAccessToken, adminAccessToken } = require('../fixtures/token.fixture');
  
  describe('Restaurants routes', () => {
    describe('GET /v1/restaurants', () => {    
  
      test('should correctly apply filter on name field', async () => {      
  
        const res = await request(app)
          .get('/v1/restaurants')        
          .query({ name: "McDonalds" })
          .send()
          .expect(httpStatus.OK);
  
        expect(res.body).toEqual({
          results: expect.any(Array),
          page: 1,
          limit: 10,
          totalPages: 1,
          totalResults: 1,
        });
        expect(res.body.results).toHaveLength(1);
        expect(res.body.results[0].id).toBe(userOne._id.toHexString());
      });
    });
  });
  