Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Valenti derdaani

View GitHub Profile
@derdaani
derdaani / service.spec.ts
Created Mar 24, 2020
Jasmine mock getters, class variables, class functions
View service.spec.ts
describe('Service Test', () => {
let service: SomeService;
let stubbedService: jasmine.SpyObj<StubbedService>;
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
{
provide: StubbedService,
useValue: {
You can’t perform that action at this time.