chore: enable noUncheckedIndexedAccess, better type check (#2608)
This commit is contained in:
@@ -20,17 +20,17 @@ describe("upgradeToV8", () => {
|
||||
|
||||
const feeds = await browserDB.feeds.toArray()
|
||||
expect(feeds.length).toEqual(3)
|
||||
expect(feeds[0].tipUsers).toEqual(insertFeeds[0].tipUsers)
|
||||
expect(feeds[1].tipUsers).toEqual(insertFeeds[1].tipUsers)
|
||||
expect(feeds[2].tipUsers).toEqual(insertFeeds[2].tipUsers)
|
||||
expect(feeds[0]!.tipUsers).toEqual(insertFeeds[0]!.tipUsers)
|
||||
expect(feeds[1]!.tipUsers).toEqual(insertFeeds[1]!.tipUsers)
|
||||
expect(feeds[2]!.tipUsers).toEqual(insertFeeds[2]!.tipUsers)
|
||||
|
||||
await browserDB.transaction("rw", [browserDB.feeds], async (tx) => {
|
||||
await browserDB.upgradeToV8(tx)
|
||||
})
|
||||
const feedsAfterMigrate = await browserDB.feeds.toArray()
|
||||
expect(feedsAfterMigrate.length).toEqual(3)
|
||||
expect(feedsAfterMigrate[0].tipUsers).toEqual([])
|
||||
expect(feedsAfterMigrate[1].tipUsers).toEqual(null)
|
||||
expect(feedsAfterMigrate[2].tipUsers).toEqual([{ name: "user1" }])
|
||||
expect(feedsAfterMigrate[0]!.tipUsers).toEqual([])
|
||||
expect(feedsAfterMigrate[1]!.tipUsers).toEqual(null)
|
||||
expect(feedsAfterMigrate[2]!.tipUsers).toEqual([{ name: "user1" }])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user