fake-indexeddb 4.0.0-beta.6 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/build/cjs/FDBCursor.js +8 -0
- package/build/esm/FDBCursor.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,20 +118,17 @@ To use it on all Jest tests without having to include it in each file, add the a
|
|
|
118
118
|
|
|
119
119
|
```json
|
|
120
120
|
{
|
|
121
|
-
...
|
|
122
121
|
"setupFiles": [
|
|
123
|
-
"fake-indexeddb/auto
|
|
122
|
+
"fake-indexeddb/auto"
|
|
124
123
|
]
|
|
125
124
|
}
|
|
126
125
|
```
|
|
127
126
|
|
|
128
|
-
That's "auto.cjs" rather than just "auto" to make sure it picks up the CommonJS version. Otherwise it would use the ESM version, which Jest does not support without [some extra configuration](https://jestjs.io/docs/ecmascript-modules).
|
|
129
|
-
|
|
130
127
|
### Wiping/resetting the indexedDB for a fresh state
|
|
131
128
|
|
|
132
129
|
If you are keeping your tests completely isolated you might want to "reset" the state of the mocked indexedDB. You can do this by creating a new instance of `IDBFactory`, which lets you have a totally fresh start.
|
|
133
130
|
|
|
134
|
-
```
|
|
131
|
+
```js
|
|
135
132
|
import "fake-indexeddb/auto";
|
|
136
133
|
import { IDBFactory } from "fake-indexeddb";
|
|
137
134
|
|
package/build/cjs/FDBCursor.js
CHANGED
package/build/esm/FDBCursor.js
CHANGED
package/package.json
CHANGED