Skip to content

Commit 383ccf1

Browse files
authored
test(proxyMap): add test for non-iterable initial entries error (#1210)
1 parent 975fb17 commit 383ccf1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/proxyMap.test.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,12 @@ describe('proxyMap', () => {
330330
})
331331
})
332332

333+
it('should throw TypeError when initial entries is not iterable', () => {
334+
expect(() => proxyMap(123 as any)).toThrow(
335+
'proxyMap:\n\tinitial state must be iterable\n\t\ttip: structure should be [[key, value]]',
336+
)
337+
})
338+
333339
describe('snapshot', () => {
334340
it('should error when trying to mutate a snapshot', () => {
335341
const state = proxyMap()

0 commit comments

Comments
 (0)