|
| 1 | +// Jest Snapshot v1, https://goo.gl/fbAQLP |
| 2 | + |
| 3 | +exports[`store.utils getStorageKey should return storage none and empty key if options is not provided 1`] = ` |
| 4 | +{ |
| 5 | + "key": "", |
| 6 | + "storage": "none", |
| 7 | +} |
| 8 | +`; |
| 9 | + |
| 10 | +exports[`store.utils getStorageKey should return storage none and empty key if storage is not provided 1`] = ` |
| 11 | +{ |
| 12 | + "key": "TestState", |
| 13 | + "storage": "none", |
| 14 | +} |
| 15 | +`; |
| 16 | + |
| 17 | +exports[`store.utils getStorageKey should return the storage key with only app and name if prefix is not provided 1`] = ` |
| 18 | +{ |
| 19 | + "key": "testApp | TestState", |
| 20 | + "storage": "session", |
| 21 | +} |
| 22 | +`; |
| 23 | + |
| 24 | +exports[`store.utils getStorageKey should return the storage key with only name if prefix and app are not provided 1`] = ` |
| 25 | +{ |
| 26 | + "key": "TestState", |
| 27 | + "storage": "local", |
| 28 | +} |
| 29 | +`; |
| 30 | + |
| 31 | +exports[`store.utils getStorageKey should return the storage key with only prefix and name if app is not provided 1`] = ` |
| 32 | +{ |
| 33 | + "key": "testPrefix | TestState", |
| 34 | + "storage": "local", |
| 35 | +} |
| 36 | +`; |
| 37 | + |
| 38 | +exports[`store.utils getStorageKey should return the storage key with prefix, app, and name 1`] = ` |
| 39 | +{ |
| 40 | + "key": "testPrefix | testApp | TestState", |
| 41 | + "storage": "local", |
| 42 | +} |
| 43 | +`; |
| 44 | + |
| 45 | +exports[`store.utils mergeDeep should handle merging when the first argument is undefined 1`] = ` |
| 46 | +{ |
| 47 | + "a": 1, |
| 48 | + "b": 2, |
| 49 | +} |
| 50 | +`; |
| 51 | + |
| 52 | +exports[`store.utils mergeDeep should handle merging when the second argument is undefined 1`] = `undefined`; |
| 53 | + |
| 54 | +exports[`store.utils mergeDeep should handle merging with nested null and undefined values 1`] = ` |
| 55 | +{ |
| 56 | + "a": { |
| 57 | + "b": 1, |
| 58 | + "c": 2, |
| 59 | + "d": undefined, |
| 60 | + }, |
| 61 | +} |
| 62 | +`; |
| 63 | + |
| 64 | +exports[`store.utils mergeDeep should handle null and undefined values gracefully 1`] = ` |
| 65 | +{ |
| 66 | + "a": 1, |
| 67 | + "b": { |
| 68 | + "c": 2, |
| 69 | + }, |
| 70 | + "d": undefined, |
| 71 | +} |
| 72 | +`; |
| 73 | + |
| 74 | +exports[`store.utils mergeDeep should merge arrays by extending the first array if extendArrays is true 1`] = ` |
| 75 | +{ |
| 76 | + "a": [ |
| 77 | + 1, |
| 78 | + 2, |
| 79 | + 3, |
| 80 | + 4, |
| 81 | + ], |
| 82 | +} |
| 83 | +`; |
| 84 | + |
| 85 | +exports[`store.utils mergeDeep should merge arrays by replacing the first array if extendArrays is false 1`] = ` |
| 86 | +{ |
| 87 | + "a": [ |
| 88 | + 3, |
| 89 | + 4, |
| 90 | + ], |
| 91 | +} |
| 92 | +`; |
| 93 | + |
| 94 | +exports[`store.utils mergeDeep should merge two objects deeply 1`] = ` |
| 95 | +{ |
| 96 | + "a": 1, |
| 97 | + "b": { |
| 98 | + "c": 4, |
| 99 | + "d": 3, |
| 100 | + "e": 5, |
| 101 | + }, |
| 102 | + "f": 6, |
| 103 | +} |
| 104 | +`; |
| 105 | + |
| 106 | +exports[`store.utils mergeDeep should override values in the first object with values from the second object 1`] = ` |
| 107 | +{ |
| 108 | + "a": 1, |
| 109 | + "b": 3, |
| 110 | + "c": 4, |
| 111 | +} |
| 112 | +`; |
| 113 | + |
| 114 | +exports[`store.utils uniqueBy should handle an array with no duplicates 1`] = ` |
| 115 | +[ |
| 116 | + { |
| 117 | + "id": 1, |
| 118 | + "name": "a", |
| 119 | + }, |
| 120 | +] |
| 121 | +`; |
| 122 | + |
| 123 | +exports[`store.utils uniqueBy should return an array with unique objects based on a function 1`] = ` |
| 124 | +[ |
| 125 | + { |
| 126 | + "id": 1, |
| 127 | + "name": "a", |
| 128 | + }, |
| 129 | + { |
| 130 | + "id": 2, |
| 131 | + "name": "b", |
| 132 | + }, |
| 133 | +] |
| 134 | +`; |
| 135 | + |
| 136 | +exports[`store.utils uniqueBy should return an array with unique objects based on a property 1`] = ` |
| 137 | +[ |
| 138 | + { |
| 139 | + "id": 1, |
| 140 | + "name": "a", |
| 141 | + }, |
| 142 | +] |
| 143 | +`; |
0 commit comments