Dexie.js: Error: Cannot read property 'only' of undefined

Created on 22 Mar 2017  路  3Comments  路  Source: dfahlander/Dexie.js

This happens unit testing in node.js with fake-indexeddb

WriteableCollection.Collection (node_modules/dexie/tools/tmp/src/Dexie.js:1920:24)
new WriteableCollection (node_modules/dexie/tools/tmp/src/Dexie.js:2356:20)
WhereClause.equals (node_modules/dexie/tools/tmp/src/Dexie.js:1658:24)
WriteableTable.update (node_modules/dexie/tools/tmp/src/Dexie.js:1310:42)
Test.<anonymous> (test.js:23:18)
step (test.js:3:191)

Most helpful comment

Well, It seems to work with the following workaround:

const Dexie = require('dexie')

Dexie.dependencies.indexedDB = require('fake-indexeddb')
Dexie.dependencies.IDBKeyRange = require('fake-indexeddb/lib/FDBKeyRange')

Thanks anyway (:

All 3 comments

I don't know much about fake-indexedDB and whether it supports the full indexedDB spec or not.

Well, It seems to work with the following workaround:

const Dexie = require('dexie')

Dexie.dependencies.indexedDB = require('fake-indexeddb')
Dexie.dependencies.IDBKeyRange = require('fake-indexeddb/lib/FDBKeyRange')

Thanks anyway (:

@ghost can you share your link of the unit test that you written .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Buzut picture Buzut  路  3Comments

nezcich picture nezcich  路  3Comments

xavibonell picture xavibonell  路  4Comments

CasperPas picture CasperPas  路  3Comments

fulltic picture fulltic  路  4Comments