From 7a51a0fbde445e346a83982dd6a16ce164521e26 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 2 Mar 2020 22:20:47 -0500 Subject: Abstract Yomichan extension script execution --- test/dictionary-validate.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/dictionary-validate.js') 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) { -- cgit v1.2.3