title: angular - ReferenceError: Can't find variable: URLSearchParams in http://localhost:9877src/test.ts
body: <p>This is my function in ts file.</p>
  
  <pre><code>getFeatures () {
      const queryString = new URLSearchParams();
      ...
  }
  </code></pre>
  
  <p>This is my jasmine file.</p>
  
  <pre><code> it('should get features', inject([FeatureSupportService], (service : FeatureSupportService) =&gt; {
      expect(service.getFeatures()).toBeTruthy();
    }));
  </code></pre>
  
  <p>Error: I am not getting this error in karma but I am getting this error when I try to code coverage with <code>yarn test</code></p>
  
  <pre><code>Can't find variable: URLSearchParams in http://localhost:9877src/test.ts
  </code></pre>