Using Jasmine with Ionic is there a way to mock/stub a static namespace function call?
<p>I'm new to this space so bear with me. I am working in an Ionic 2 project so it is using Angular 2, Typescript, and Jasmine for unit testing. I'm trying to write a unit test right now for a weird case. I have a third-party library that I import in a component with an import at the top like <code>import * as thirdparty from "thirdparty-library"</code> and later my component makes a call like <code>thirdparty.setup(someStuff, someMoreStuff, anotherFunc)</code>.</p>

<p>Really what I want to do is have a mock <code>thirdparty</code> with its own fake <code>anotherFunc</code>that I pass from the unit test. So is there a way to pass something in the constructor and have it override this <code>thirdparty</code> namespace? Thank you in advance</p>