@@ -75,6 +75,9 @@ import {
75
75
V12_STORES ,
76
76
V13_STORES ,
77
77
V14_STORES ,
78
+ V15_STORES ,
79
+ V16_STORES ,
80
+ V17_STORES ,
78
81
V1_STORES ,
79
82
V3_STORES ,
80
83
V4_STORES ,
@@ -1229,6 +1232,30 @@ describe('IndexedDbSchema: createOrUpgradeDb', () => {
1229
1232
} ) ;
1230
1233
} ) ;
1231
1234
1235
+ it ( 'can upgrade from version 14 to 15' , async ( ) => {
1236
+ await withDb ( 14 , async ( ) => { } ) ;
1237
+ await withDb ( 15 , async ( db , version , objectStores ) => {
1238
+ expect ( version ) . to . have . equal ( 14 ) ;
1239
+ expect ( objectStores ) . to . have . members ( V15_STORES ) ;
1240
+ } ) ;
1241
+ } ) ;
1242
+
1243
+ it ( 'can upgrade from version 15 to 16' , async ( ) => {
1244
+ await withDb ( 15 , async ( ) => { } ) ;
1245
+ await withDb ( 16 , async ( db , version , objectStores ) => {
1246
+ expect ( version ) . to . have . equal ( 15 ) ;
1247
+ expect ( objectStores ) . to . have . members ( V16_STORES ) ;
1248
+ } ) ;
1249
+ } ) ;
1250
+
1251
+ it ( 'can upgrade from version 16 to 17' , async ( ) => {
1252
+ await withDb ( 16 , async ( ) => { } ) ;
1253
+ await withDb ( 17 , async ( db , version , objectStores ) => {
1254
+ expect ( version ) . to . have . equal ( 16 ) ;
1255
+ expect ( objectStores ) . to . have . members ( V17_STORES ) ;
1256
+ } ) ;
1257
+ } ) ;
1258
+
1232
1259
it ( 'downgrading throws a custom error' , async function ( this : Context ) {
1233
1260
// Upgrade to latest version
1234
1261
await withDb ( SCHEMA_VERSION , async ( db , version ) => {
0 commit comments