-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert fix to #66 and add a test using Dexie
- Loading branch information
1 parent
f56e085
commit b96a4f2
Showing
5 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,7 @@ | |
"build-qunit": "mkdir build/esm/test/indexedDBmock && cp src/test/indexedDBmock/* build/esm/test/indexedDBmock && browserify src/test/indexedDBmock/exports-qunit-bundle.js -o build/esm/test/indexedDBmock/exports-qunit-bundle.js -t [ babelify --presets [ @babel/preset-env ] ]", | ||
"test-qunit": "yarn run build-qunit && node-qunit-phantomjs build/esm/test/indexedDBmock/index.html", | ||
"test-w3c": "node src/test/web-platform-tests/run-all.js", | ||
"test": "rm -rf build && yarn run lint && yarn run build && yarn run test-jest && node test/test.js && yarn run test-w3c && yarn run test-mocha && yarn run test-qunit", | ||
"test": "rm -rf build && yarn run lint && yarn run build && yarn run test-jest && node test/test.js && node test/dexie.js && yarn run test-w3c && yarn run test-mocha && yarn run test-qunit", | ||
"prepare": "husky install" | ||
}, | ||
"author": "Jeremy Scheff <[email protected]> (http://dumbmatter.com/)", | ||
|
@@ -122,6 +122,7 @@ | |
"babelify": "^10.0.0", | ||
"browserify": "^17.0.0", | ||
"core-js": "^3.23.3", | ||
"dexie": "^3.2.2", | ||
"glob": "^8.0.3", | ||
"husky": "^7.0.4", | ||
"jest": "^28.1.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import assert from "node:assert"; | ||
import "../auto/index.mjs"; | ||
import Dexie from "dexie"; | ||
|
||
const db = new Dexie("MyDatabase"); | ||
|
||
db.version(1).stores({ | ||
friends: "++id, name, age", | ||
}); | ||
|
||
await db.friends.add({ | ||
name: "Alice", | ||
age: 25, | ||
street: "East 13:th Street", | ||
}); | ||
|
||
await db.friends.add({ | ||
name: "Bob", | ||
age: 80, | ||
street: "East 13:th Street", | ||
}); | ||
|
||
const oldFriends = await db.friends.where("age").above(75).toArray(); | ||
|
||
assert.equal(oldFriends.length, 1); | ||
process.exit(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters