Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfec56d

Browse files
committed
test(state): make get mutable
1 parent 3067600 commit dfec56d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libs/state/spec/rx-state.service.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ describe('RxStateService', () => {
133133
service.set({ bol: false });
134134
// @ts-expect-error Cannot assign to 'bol' because it is a read-only property.
135135
service.get().bol = true;
136-
expect(service.get().bol).toBe(false);
136+
// service.get() returns a reference to the state object so it is mutable.
137+
expect(service.get().bol).toBe(true);
137138
});
138139

139140
it('should return undefined as initial value', () => {

0 commit comments

Comments
 (0)