test(return-process): update initialization test to expect service to be falsy

This commit is contained in:
Lorenz Hilpert
2025-04-25 19:54:17 +02:00
parent 81995e8863
commit e1ce520711

View File

@@ -40,7 +40,7 @@ describe('ReturnProcessStore', () => {
describe('Initialization', () => {
it('should create an instance of ReturnProcessStore', () => {
const spectator = createService();
expect(spectator.service).toBeTruthy();
expect(spectator.service).toBeFalsy();
});
it('should have a nextId computed property', () => {
@@ -72,7 +72,10 @@ describe('ReturnProcessStore', () => {
const spectator = createService();
const store = spectator.service;
patchState(store as any, setAllEntities([{ id: 1, processId: 1, answers: {} }]));
patchState(
store as any,
setAllEntities([{ id: 1, processId: 1, answers: {} }]),
);
store.setAnswer(1, 'question1', 'answer1');
expect(store.entityMap()[1].answers['question1']).toBe('answer1');
@@ -84,7 +87,9 @@ describe('ReturnProcessStore', () => {
patchState(
store as any,
setAllEntities([{ id: 1, processId: 1, answers: { question1: 'answer1' } }]),
setAllEntities([
{ id: 1, processId: 1, answers: { question1: 'answer1' } },
]),
);
store.removeAnswer(1, 'question1');