Add initial keyboard shortcut support.

This commit is contained in:
Dermot Duffy
2024-06-05 21:44:17 -07:00
parent 904f6d8142
commit 7ab545738d
186 changed files with 9564 additions and 3658 deletions
+48
View File
@@ -22,6 +22,7 @@ import {
isTruthy,
isValidDate,
prettifyTitle,
recursivelyMergeObjectsConcatenatingArraysUniquely,
recursivelyMergeObjectsNotArrays,
runWhenIdleIfSupported,
setify,
@@ -345,6 +346,53 @@ describe('recursivelyMergeObjectsNotArrays', () => {
});
});
describe('recursivelyMergeObjectsConcatenatingArraysUniquely', () => {
it('should recursively merge objects but uniquely concat arrays', () => {
expect(
recursivelyMergeObjectsConcatenatingArraysUniquely(
{},
{
a: {
b: {
c: 3,
d: {
e: 4,
},
array: [5, 1, 2, 3, 4],
},
other: {
field: 7,
},
},
},
{
a: {
b: {
array: [4, 4, 5],
d: {
e: 5,
},
},
},
},
),
).toEqual({
a: {
b: {
c: 3,
array: [5, 1, 2, 3, 4],
d: {
e: 5,
},
},
other: {
field: 7,
},
},
});
});
});
describe('aspectRatioToStyle', () => {
it('default', () => {
expect(aspectRatioToStyle()).toEqual({ 'aspect-ratio': 'auto' });