diff options
author | Florian Dold <florian@dold.me> | 2021-02-16 10:31:55 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-02-16 13:47:00 +0100 |
commit | d1f00aeaa26af6835ea3f47ac280b1e67d672fa2 (patch) | |
tree | 9a5a364f8a5eb1e038bca936d621c015dab53304 /packages/idb-bridge/src/idb-wpt-ported/wptsupport.ts | |
parent | d384bd5c62198f1160119e60776350109a8ca7d3 (diff) | |
download | wallet-core-d1f00aeaa26af6835ea3f47ac280b1e67d672fa2.tar.xz |
get IDB tests to pass again, add new one
Diffstat (limited to 'packages/idb-bridge/src/idb-wpt-ported/wptsupport.ts')
-rw-r--r-- | packages/idb-bridge/src/idb-wpt-ported/wptsupport.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/idb-bridge/src/idb-wpt-ported/wptsupport.ts b/packages/idb-bridge/src/idb-wpt-ported/wptsupport.ts index 10c11b7a6..f7b065f23 100644 --- a/packages/idb-bridge/src/idb-wpt-ported/wptsupport.ts +++ b/packages/idb-bridge/src/idb-wpt-ported/wptsupport.ts @@ -23,8 +23,18 @@ export function createdb( return rq_open; } -export function assert_key_equals(actual: any, expected: any, description?: string) { +export function assert_key_equals( + actual: any, + expected: any, + description?: string, +) { if (0 != compareKeys(actual, expected)) { throw Error("expected keys to be the same"); } } + +export function assert_equals(actual: any, expected: any) { + if (actual !== expected) { + throw Error("assert_equals failed"); + } +} |