Files
pokdedemo/src/app/poke-share-info.service.spec.ts
2025-01-01 15:16:24 +01:00

27 lines
642 B
TypeScript

import { TestBed } from '@angular/core/testing';
import { PokeShareInfoService } from './poke-share-info.service';
describe('PokeShareInfoService', () => {
let service: PokeShareInfoService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(PokeShareInfoService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
it('should set value when setValue is called', (done) => {
const testValue = 'Test Value';
service.getObservable().subscribe((value) => {
expect(value).toBe(testValue);
done();
});
service.setValue(testValue);
});
});