From 70ccf269e4d54bfd89d6808a5779eaa3c50c7a0f Mon Sep 17 00:00:00 2001 From: radex Date: Mon, 20 Jan 2020 15:59:21 +0100 Subject: [PATCH] fix tests on ios --- src/adapters/__tests__/commonTests.js | 10 ++++++---- src/adapters/sqlite/index.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/adapters/__tests__/commonTests.js b/src/adapters/__tests__/commonTests.js index dee74dfd5..c54ce0cd1 100644 --- a/src/adapters/__tests__/commonTests.js +++ b/src/adapters/__tests__/commonTests.js @@ -37,12 +37,14 @@ export default () => [ // expect(() => makeAdapter({})).toThrowError(/missing migrations/) expect(() => makeAdapter({ migrationsExperimental: [] })).toThrow( - /LokiJSAdapter `migrationsExperimental` option has been renamed to `migrations`/, + /`migrationsExperimental` option has been renamed to `migrations`/, ) - expect(() => makeAdapter({ experimentalUseIncrementalIndexedDB: false })).toThrow( - /LokiJSAdapter `experimentalUseIncrementalIndexedDB` option has been renamed/, - ) + if (AdapterClass.name === 'LokiJSAdapter') { + expect(() => makeAdapter({ experimentalUseIncrementalIndexedDB: false })).toThrow( + /LokiJSAdapter `experimentalUseIncrementalIndexedDB` option has been renamed/, + ) + } expect(() => adapterWithMigrations({ migrations: [] })).toThrow(/use schemaMigrations()/) diff --git a/src/adapters/sqlite/index.js b/src/adapters/sqlite/index.js index e2e6e13bb..ea137a6a9 100644 --- a/src/adapters/sqlite/index.js +++ b/src/adapters/sqlite/index.js @@ -221,7 +221,7 @@ export default class SQLiteAdapter implements DatabaseAdapter, SQLDatabaseAdapte invariant( // $FlowFixMe options.migrationsExperimental === undefined, - 'SQLiteAdapter migrationsExperimental has been renamed to migrations', + 'SQLiteAdapter `migrationsExperimental` option has been renamed to `migrations`', ) invariant( NativeDatabaseBridge,