summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-12-15 13:33:02 +0100
committerWojtek Kosior <koszko@koszko.org>2021-12-15 13:33:02 +0100
commit9a7623de1458f799baa109d0afbed08547874550 (patch)
tree5e62c0c22e680666a3d7729b5b8f01051cade2f7 /test/unit
parent58fe4c7d806359bed299f74ba56902ab396a6ed1 (diff)
downloadbrowser-extension-9a7623de1458f799baa109d0afbed08547874550.tar.gz
browser-extension-9a7623de1458f799baa109d0afbed08547874550.zip
facilitate mocking imported values
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/test_indexeddb.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/test/unit/test_indexeddb.py b/test/unit/test_indexeddb.py
index 965f318..d48946e 100644
--- a/test/unit/test_indexeddb.py
+++ b/test/unit/test_indexeddb.py
@@ -55,13 +55,7 @@ def test_save_remove_item(execute_in_page, indexeddb_code):
"""
execute_in_page(indexeddb_code)
# Don't use Haketilo's default initial data.
- execute_in_page(
- '''{
- const _get_db = haketilodb.get;
- get_db = () => _get_db({});
- haketilodb.get = get_db;
- }'''
- )
+ execute_in_page('initial_data = {};')
# Start with no database.
execute_in_page(