Skip to content

Commit 0739d88

Browse files
committed
Style
1 parent ab3e7b1 commit 0739d88

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

tests/unit/onyxClearWebStorageTest.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,8 @@ describe('Set data while storage is clearing', () => {
138138
[collectionItemKey1]: {id: 1, name: 'first'},
139139
[collectionItemKey2]: {id: 2, name: 'second'},
140140
} as GenericCollection)
141-
.then(() => {
142-
// When clear is called with the collection prefix as a key to preserve
143-
return Onyx.clear([ONYX_KEYS.COLLECTION.TEST]);
144-
})
141+
// When clear is called with the collection prefix as a key to preserve
142+
.then(() => Onyx.clear([ONYX_KEYS.COLLECTION.TEST]))
145143
.then(() => waitForPromisesToResolve())
146144
.then(() => {
147145
// Then both collection members are preserved in the cache and storage
@@ -167,10 +165,8 @@ describe('Set data while storage is clearing', () => {
167165

168166
// Given that Onyx has both a collection item and a regular key set
169167
return Promise.all([Onyx.set(ONYX_KEYS.REGULAR_KEY, SET_VALUE), Onyx.mergeCollection(ONYX_KEYS.COLLECTION.TEST, {[collectionItemKey1]: 'value'} as GenericCollection)])
170-
.then(() => {
171-
// When clear is called preserving only the collection
172-
return Onyx.clear([ONYX_KEYS.COLLECTION.TEST]);
173-
})
168+
// When clear is called preserving only the collection
169+
.then(() => Onyx.clear([ONYX_KEYS.COLLECTION.TEST]))
174170
.then(() => waitForPromisesToResolve())
175171
.then(() => {
176172
// Then the collection member is preserved
@@ -191,10 +187,8 @@ describe('Set data while storage is clearing', () => {
191187

192188
// Given that Onyx has a collection item and a regular key set
193189
return Promise.all([Onyx.set(ONYX_KEYS.REGULAR_KEY, SET_VALUE), Onyx.mergeCollection(ONYX_KEYS.COLLECTION.TEST, {[collectionItemKey1]: 'value'} as GenericCollection)])
194-
.then(() => {
195-
// When clear is called preserving both the collection and the regular key
196-
return Onyx.clear([ONYX_KEYS.COLLECTION.TEST, ONYX_KEYS.REGULAR_KEY]);
197-
})
190+
// When clear is called preserving both the collection and the regular key
191+
.then(() => Onyx.clear([ONYX_KEYS.COLLECTION.TEST, ONYX_KEYS.REGULAR_KEY]))
198192
.then(() => waitForPromisesToResolve())
199193
.then(() => {
200194
// Then both the collection member and the regular key are preserved

0 commit comments

Comments
 (0)