Gwendolyn Van Hove
Gwendolyn Van Hove
I want to make sure I'm understanding this use case and the issues you're seeing with it. This is my current understanding so far. Given a function exported directly from...
Ok, I think I've got a handle on this now. I would be happy to review a pull request to add something like `spyOnModule`. I would like it to be...
I think it makes sense for a `spyOnModule` to also spy on a normal function as well as the function returned by a getter. This should allow it to be...
@ellipticaldoor it looks like you're actually using Jest for all of that testing and not Jasmine, so I'm not sure this will apply here.
Unfortunately, @kevinlbatchelor, I don't think that use case is something that can be solved, since Jasmine doesn't have access to the scope inside your module to make changes.
@josh08h this is going to largely come down to what code is being generated by your bundler/compiler of choice as to whether this is mockable. If `import { sayHello }...
Duplicate of #1851 (which the original submitter has closed). Please take a look again at the [CONTRIBUTING guide](https://github.com/jasmine/jasmine/blob/main/.github/CONTRIBUTING.md), specifically what to do [before submitting a pull request](https://github.com/jasmine/jasmine/blob/main/.github/CONTRIBUTING.md#before-committing-or-submitting-a-pull-request). Specifically: * You...
@brandonros if you simply want to change the strategy for the spy to execute when called, you can always call `and.callThrough` again on it later without needing to remove the...
@ljharb As mentioned in the other issues, Jasmine will clean up any spies that were created with `spyOn` at the end of the spec or suite where they were instantiated,...
Let me rephrase this then. The only use cases I've seen for when people want to `unspy` on something involves them immediately re-`spyOn` that same thing to change something. So...