title: How to disable type checking for test file in Visual Code Studio
body: <p>I am currently write some tests for my angular application. When I mock class to check if method is correctly called, I make a mock implementation. When I do that my code is underlined with red dots because my mock does not respect the true implementation of the type.</p>
  
  <p>Here is an example. Here I want mock HttpLink class in order to test that create function is called. I dont mind how HttpLink object is construct. So I mocked HttpLink class and I mock create function. But visual studio code put red dot when I call the constructor because it does not respect the true HttpLink implementation :</p>
  
  <pre><code>import { Apollo } from 'apollo-angular'
  jest.mock('apollo-angular', () =&gt; {
    return {
      Apollo: () =&gt; {
        return {
          create: jest.fn()
        }
      }
    }
  })
  import { HttpLink } from 'apollo-angular-link-http'
  jest.mock('apollo-angular-link-http', () =&gt; {
    return {
      HttpLink: () =&gt; {
        return {
          create: jest.fn()
        }
      }
    }
  })
  import { GraphqlService } from './graphql.service'
  
  describe('GraphqlService', () =&gt; {
    let apollo = new Apollo()
    let httpLink = new HttpLink() // &lt;====== This is red because type checking see this class need one argument but I mocked the constructor.
    let graphqlService
    beforeAll(() =&gt; {
      graphqlService = new GraphqlService(apollo, httpLink)
    })
  
    it('should be created', () =&gt; {
      expect(graphqlService).toBeTruthy()
    })
  
    it('should create apollo client correctly', () =&gt; {
      expect(apollo.create).toHaveBeenCalled()
    })
  })
  </code></pre>
  
  <p>Is there a way to desactivate type checking that visual studio code does, but only for test files ?</p>