aboutsummaryrefslogtreecommitdiff
path: root/packages/idb-bridge/src/idb-wpt-ported
diff options
context:
space:
mode:
Diffstat (limited to 'packages/idb-bridge/src/idb-wpt-ported')
-rw-r--r--packages/idb-bridge/src/idb-wpt-ported/idbcursor-continue-objectstore.test.ts5
-rw-r--r--packages/idb-bridge/src/idb-wpt-ported/idbcursor-delete-exception-order.test.ts9
-rw-r--r--packages/idb-bridge/src/idb-wpt-ported/idbcursor-update-index.test.ts3
3 files changed, 11 insertions, 6 deletions
diff --git a/packages/idb-bridge/src/idb-wpt-ported/idbcursor-continue-objectstore.test.ts b/packages/idb-bridge/src/idb-wpt-ported/idbcursor-continue-objectstore.test.ts
index ecfac82f4..4843b13ab 100644
--- a/packages/idb-bridge/src/idb-wpt-ported/idbcursor-continue-objectstore.test.ts
+++ b/packages/idb-bridge/src/idb-wpt-ported/idbcursor-continue-objectstore.test.ts
@@ -112,7 +112,8 @@ test.cb("WPT test idbcursor_continue_objectstore3.htm", (t) => {
};
});
-// IDBCursor.continue() - object store - attempt to iterate to the next record when the direction is set for the previous record
+// IDBCursor.continue() - object store - attempt to iterate to the
+// next record when the direction is set for the previous record
test.cb("WPT test idbcursor_continue_objectstore4.htm", (t) => {
var db: any;
const records = [
@@ -151,7 +152,9 @@ test.cb("WPT test idbcursor_continue_objectstore4.htm", (t) => {
t.deepEqual(cursor.value.pKey, records[1].pKey, "second cursor pkey");
t.throws(
() => {
+ console.log("**** continuing cursor");
cursor.continue(records[2].pKey);
+ console.log("**** this should not happen");
},
{
name: "DataError",
diff --git a/packages/idb-bridge/src/idb-wpt-ported/idbcursor-delete-exception-order.test.ts b/packages/idb-bridge/src/idb-wpt-ported/idbcursor-delete-exception-order.test.ts
index c80e276e6..604061acd 100644
--- a/packages/idb-bridge/src/idb-wpt-ported/idbcursor-delete-exception-order.test.ts
+++ b/packages/idb-bridge/src/idb-wpt-ported/idbcursor-delete-exception-order.test.ts
@@ -18,9 +18,10 @@ test("WPT idbcursor-delete-exception-order.htm", async (t) => {
const cursor = r.result;
t.assert(!!cursor);
t.throws(
- () => {},
+ () => {
+ cursor!.delete();
+ },
{ name: "TransactionInactiveError" },
-
'"Transaction inactive" check (TransactionInactivError) ' +
'should precede "read only" check (ReadOnlyError)',
);
@@ -72,7 +73,9 @@ test("WPT idbcursor-delete-exception-order.htm", async (t) => {
r.onsuccess = null;
const cursor = r.result;
t.throws(
- () => {},
+ () => {
+ cursor!.delete();
+ },
{ name: "ReadOnlyError" },
'"Read only" check (ReadOnlyError) should precede ' +
'"key only flag" (InvalidStateError) check',
diff --git a/packages/idb-bridge/src/idb-wpt-ported/idbcursor-update-index.test.ts b/packages/idb-bridge/src/idb-wpt-ported/idbcursor-update-index.test.ts
index 950a31e38..363ef4afa 100644
--- a/packages/idb-bridge/src/idb-wpt-ported/idbcursor-update-index.test.ts
+++ b/packages/idb-bridge/src/idb-wpt-ported/idbcursor-update-index.test.ts
@@ -202,8 +202,7 @@ test.cb("WPT test idbcursor_update_index5.htm", (t) => {
var record = cursor.value;
// Original test uses different uncloneable value
- record.data = { foo: "42" };
- record.data.me = record.data;
+ record.data = { foo: () => {} };
t.throws(
function () {
cursor.update(record);