aboutsummaryrefslogtreecommitdiff
path: root/test/dictionary-validate.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-03-02 22:20:47 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-03-02 22:20:47 -0500
commit7a51a0fbde445e346a83982dd6a16ce164521e26 (patch)
tree0d19ad4839622f1a5c375a89f6719b64b9a83a83 /test/dictionary-validate.js
parent46fee07d36b3966af9bacca8c6253b044bde07ee (diff)
Abstract Yomichan extension script execution
Diffstat (limited to 'test/dictionary-validate.js')
-rw-r--r--test/dictionary-validate.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/dictionary-validate.js b/test/dictionary-validate.js
index 14eee2ed..6496f2ac 100644
--- a/test/dictionary-validate.js
+++ b/test/dictionary-validate.js
@@ -18,10 +18,12 @@
const fs = require('fs');
const path = require('path');
-const yomichanTest = require('./yomichan-test');
+const {JSZip} = require('./yomichan-test');
+const {VM} = require('./yomichan-vm');
-const JSZip = yomichanTest.JSZip;
-const {JsonSchema} = yomichanTest.requireScript('ext/bg/js/json-schema.js', ['JsonSchema']);
+const vm = new VM();
+vm.execute('bg/js/json-schema.js');
+const JsonSchema = vm.get('JsonSchema');
function readSchema(relativeFileName) {