Skip to content

Commit

Permalink
fix(signals): add test for withProps and numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
rainerhahnekamp committed Jan 5, 2025
1 parent 63c5a4a commit 34fd125
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/signals/spec/with-props.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,13 @@ describe('withProps', () => {

expect(store[SECRET]).toBe('secret');
});

it('allows numbers as props', () => {
const Store = signalStore(withProps(() => ({ 1: 'Number One' })));
const store = TestBed.configureTestingModule({ providers: [Store] }).inject(
Store
);

expect(store[1]).toBe('Number One');
});
});

0 comments on commit 34fd125

Please sign in to comment.