Skip to content

Instantly share code, notes, and snippets.

@roman-bgonz
Last active February 11, 2023 00:08
Show Gist options
  • Save roman-bgonz/7f545c351cb025b7e031cdd27f4eabf9 to your computer and use it in GitHub Desktop.
Save roman-bgonz/7f545c351cb025b7e031cdd27f4eabf9 to your computer and use it in GitHub Desktop.
Allow re spyOn angular testing

jasmine.getEnv().allowRespy(true);

OR

beforeEach(() => { spyOn(some, "method").and.returnValue(X) })

it("Test", () => { some.method = jasmine.createSpy().and.returnValue(Y) })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment