title: Mocking Playwright library
body: <p>Working on a project using the new playwright library.</p>
  
  <p>I've started writing some unit tests and want to mock out portions of the library as I test.</p>
  
  <p>Right now I'm getting the error <code>Cannot Read Property 'launch' of undefined.</code></p>
  
  <pre><code>import MyModule from './myModule';
  import { firefox } from 'playwright'
  
  function bootStrapComponent() {
      return new MyModule();
  };
  describe('myModule Class', () =&gt; {
      var myModule;
      describe('main', () =&gt; {
          beforeEach(() =&gt; {
              myModule = bootStrapComponent();
  
          })
  
          it('should mock browswer', async() =&gt; {
              let browser = jasmine.createSpyObj('firefox', ['launch']);
              myModule.firefox.launch({});
              expect(browser.launch).toHaveBeenCalled();
          });
      });
  </code></pre>
  
  <p>I'm not sure I'm even doing this correctly.  Can you point me in the right direction?</p>