diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-31 12:30:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 12:30:31 -0400 |
commit | 00c5ae79833a641ccc5f7d31b6eea3e91db4cb71 (patch) | |
tree | e21cb14527e2bf6e74b36eeab75e994d52df37b6 /dev/translator-vm.js | |
parent | 2d57d69b9ed3adf1241074f7eb29a588bec817a2 (diff) |
DictionaryImporterMediaLoader (#1860)
* Rename param for consistency
* Move media loading functionality into DictionaryImporterMediaLoader
* Create test class for media loading
* Remove unnecessary Blob/Image/URL functionality
Diffstat (limited to 'dev/translator-vm.js')
-rw-r--r-- | dev/translator-vm.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dev/translator-vm.js b/dev/translator-vm.js index 3c3886ba..d616afc5 100644 --- a/dev/translator-vm.js +++ b/dev/translator-vm.js @@ -18,7 +18,7 @@ const fs = require('fs'); const path = require('path'); const assert = require('assert'); -const {DatabaseVM} = require('./database-vm'); +const {DatabaseVM, DatabaseVMDictionaryImporterMediaLoader} = require('./database-vm'); const {createDictionaryArchive} = require('./util'); function clone(value) { @@ -75,7 +75,8 @@ class TranslatorVM extends DatabaseVM { const testDictionaryContent = await testDictionary.generateAsync({type: 'arraybuffer'}); // Setup database - const dictionaryImporter = new DictionaryImporter(); + const dictionaryImporterMediaLoader = new DatabaseVMDictionaryImporterMediaLoader(); + const dictionaryImporter = new DictionaryImporter(dictionaryImporterMediaLoader); const dictionaryDatabase = new DictionaryDatabase(); await dictionaryDatabase.prepare(); |