title: Angular tests, socket.io "NullInjectorError: No provider for WrappedSocket"
body: <p>I'm running tests on angular and they are failing for my socket service thats using ngx-socket-io. It works in development, just not for testing. Its not creating the component correctly.</p>
  <p><a href="https://i.stack.imgur.com/HZzxs.png" rel="nofollow noreferrer">Test failure</a></p>
  <p>my service.spec.ts</p>
  <pre><code>import { TestBed } from '@angular/core/testing';
  import { SocketService } from './socket.service';
  
  describe('SocketService', () =&gt; {
    let service: SocketService;
  
    beforeEach(() =&gt; {
      TestBed.configureTestingModule({
      });
      service = TestBed.inject(SocketService);
    });
  
    it('should be created', () =&gt; {
      expect(service).toBeTruthy();
    });
  });
  </code></pre>
  <p>my service</p>
  <pre><code>import { Injectable } from '@angular/core';
  import {Socket} from 'ngx-socket-io';
  
  @Injectable({
    providedIn: 'root'
  })
  export class SocketService {
    constructor(private socket: Socket) { }
  
    getD1Data() {
      return this.createObserver('d1');
    }
  
    private createObserver(event: string) {
      return this.socket.fromEvent(event);
    }
  </code></pre>
  <p>I have tried adding the provider [WrappedSocket]  I'll be honest that was an auto fix option, but that caused way more errors.</p>
  <pre><code>import {WrappedSocket} from 'ngx-socket-io/src/socket-io.service';
  
  describe('SocketService', () =&gt; {
    let service: SocketService;
  
    beforeEach(() =&gt; {
      TestBed.configureTestingModule({
        providers: [WrappedSocket]
      });
      service = TestBed.inject(SocketService);
    });
  
  
  Error: ./src/app/modules/socket.service.spec.ts
  Module not found: Error: Can't resolve 'ngx-socket-io/src/socket-io.service' in 'C:\Users\catha\project - Copy\src\app\modules'
  </code></pre>
  <p>I'm actually not sure how it couldn't exist, considering it was an autofill.</p>
  <p>Any ideas on how to fix this? I've tried a range of providers [Socket] , [SocketIOModule] but nothing seems to work</p>