text: const { it, expect } = require('@jest/globals');
  const { createServer } = require('http');
  const { Server } = require('socket.io');
  const Client = require('socket.io-client');
  
  describe('my awesome project', () => {
    let io, serverSocket, clientSocket;
  
    beforeAll((done) => {
      const httpServer = createServer();
      io = new Server(httpServer);
      httpServer.listen(() => {
        const port = httpServer.address().port;
        clientSocket = new Client(`http://localhost:${port}`);
        io.on('connection', (socket) => {
          serverSocket = socket;
        });
        clientSocket.on('connect', done);
      });
    });
  
    afterAll(() => {
      io.close();
      clientSocket.close();
    });
  
    it('should work', (done) => {
      clientSocket.on('hello', (arg) => {
        expect(arg).toBe('world');
        done();
      });
      serverSocket.emit('hello', 'world');
    });
  
    it('should work (with ack)', (done) => {
      serverSocket.on('hi', (cb) => {
        cb('hola');
      });
      clientSocket.emit('hi', (arg) => {
        expect(arg).toBe('hola');
        done();
      });
    });
  
    // it('should...', () => {
    //   expect()
    // })
  });
  