Comments (4)
I added explicit instructions for Dexie in the README: 65fe0f7
from fakeindexeddb.
I'm still digging into how to explicitly set the global scope in Mocha but I see that your example config is using Jest which I know is the coolest flavor these days but my test library is huge and so I don't have the luxury of switch at the moment. Anyway, I do think that a config example for Mocha/Chai would be a good addition considering that this is still a VERY common tooling.
from fakeindexeddb.
It appears that buried deep in the issues of Dexie there appears a clear means to do this:
In some more digging this SO post is probably the best summary:
from fakeindexeddb.
#38 shows a couple ways to use it with Dexie. Importing fake-indexeddb/auto
is the easiest. If that's not working for you, can you link to an example?
As for how to explicitly set up the global scope in Mocha... I guess it could go in the README. I was somewhat ambivalent about adding it for Jest. But I don't really want to add it for all the testing libraries in the world, especially since it's probably better for people to be looking for this info in their testing library's documentation.
from fakeindexeddb.
Related Issues (20)
- transaction doesn't support array stores? HOT 4
- Correct way to refresh DB before each test HOT 2
- MissingAPIError: IndexedDB API missing HOT 4
- Issues with latest version of jest with the jsdom environment HOT 3
- FBDCursor broken in release/minimised build HOT 1
- FakeDOMStringList should not support array methods HOT 4
- Transactions/Cursors fail with `jsdom` HOT 7
- setTimeout problems / questions HOT 4
- 3.1.6 regression: `ReferenceError: setImmediate is not defined` HOT 1
- orderBy support HOT 4
- initialize the DB before the use. HOT 2
- Add observation for Dexie users HOT 3
- [BUG] Context loosing for `FakeDOMStringList` members while wrapping IDB
- [BUG] Invalid behavior for concurrent insertion data HOT 1
- Ref of Observable from liveQuery is not reactive HOT 7
- fake-indexeddb fails when happy-dom is loaded prior to fake-indexeddb HOT 3
- Running this in Chrome throws "Cannot set property indexedDB of #<Window> which has only a getter" HOT 3
- Release new version to npm with latest types fix HOT 3
- DataCloneError: The data being stored could not be cloned by the internal structured cloning algorithm. HOT 2
- Problem storing and retrieving CryptoKeys HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fakeindexeddb.