summaryrefslogtreecommitdiff
path: root/dev/database-vm.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-06-26 17:05:59 -0400
committerGitHub <noreply@github.com>2021-06-26 17:05:59 -0400
commit73caeac0fba13f83a810eab27dbc0aa49b3e9ef3 (patch)
tree1e82f97d87c3807397a8ffb82e4dcb14178465ca /dev/database-vm.js
parentf9167c8fddbb757d314e1545c9dc788415a1fbf7 (diff)
Test updates (#1763)
* Allow passing of globals to custom VMs * Add _serializeError * Expose document to VM
Diffstat (limited to 'dev/database-vm.js')
-rw-r--r--dev/database-vm.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/dev/database-vm.js b/dev/database-vm.js
index b682bca3..014c989f 100644
--- a/dev/database-vm.js
+++ b/dev/database-vm.js
@@ -101,8 +101,8 @@ function atob(data) {
}
class DatabaseVM extends VM {
- constructor() {
- super({
+ constructor(globals={}) {
+ super(Object.assign({
chrome,
Image,
Blob,
@@ -111,7 +111,7 @@ class DatabaseVM extends VM {
IDBKeyRange: global.IDBKeyRange,
JSZip,
atob
- });
+ }, globals));
this.context.window = this.context;
this.indexedDB = global.indexedDB;
}