title: ReferenceError: customElements is not defined
body: <p>I'm using <strong>@angular@9.0.7</strong>, <a href="https://github.com/ngneat/spectator" rel="noreferrer"><strong><code>@ngneat/spectator@5.3.1</code></strong></a> (with <strong>Jest</strong>), <a href="https://github.com/RobinHerbots/Inputmask" rel="noreferrer"><strong><code>Inputmask@5.0.3</code></strong></a> in a project and everything works on application when I run <code>ng serve</code> or even <code>ng build</code>, but it fails when I try to run a test suite for a <code>@Pipe</code> that uses <code>Inputmask</code>:</p>
  
  <p><strong><code>@Pipe</code></strong>:</p>
  
  <pre><code>import { Pipe, PipeTransform } from '@angular/core';
  
  import Inputmask from 'inputmask';
  
  @Pipe({
    name: 'appSomePipe',
  })
  export class SomePipe implements PipeTransform {
    transform(value: string): string {
      return Inputmask.format(value, {
        jitMasking: true,
        mask: '1111-1',
      });
    }
  }
  </code></pre>
  
  <p><strong><code>@Spec</code></strong>:</p>
  
  <pre><code>import { createPipeFactory, SpectatorPipe } from '@ngneat/spectator/jest';
  
  import { SomePipe } from './some.pipe';
  
  describe('SomePipe', () =&gt; {
    let spectator: SpectatorPipe&lt;SomePipe&gt;;
    const createPipe = createPipeFactory(SomePipe);
  
    it('test', () =&gt; {
      spectator = createPipe(`{{ '11111' | appSome }}`);
      expect(spectator.element).toHaveText('1111-1');
    });
  });
  </code></pre>
  
  <p>When I run <code>ng test</code>, it shows:</p>
  
  <blockquote>
    <p>ReferenceError: customElements is not defined</p>
  </blockquote>
  
  <pre><code>  2 | 
  &gt; 3 | import Inputmask from 'inputmask';
  </code></pre>
  
  <p><strong>PS</strong>: This error just appears for Angular 9, in Angular 8 all tests were successfully passed.</p>