Skip to content

Commit 3eaa089

Browse files
committed
frontend: test sparse arrays
1 parent f5935ce commit 3eaa089

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

frontends/web/src/utils/equal.test.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ describe('equal', () => {
8585
expect(equal(a, b)).toBeFalsy();
8686
expect(equal(b, a)).toBeFalsy();
8787
});
88+
89+
it('compares sparse array vs defined array', () => {
90+
expect(equal([1, , 3], [1, undefined, 3])).toBeFalsy();
91+
expect(equal([1, , 3], [1, , 3])).toBeTruthy();
92+
});
8893
});
8994

9095
describe('objects', () => {

0 commit comments

Comments
 (0)