aboutsummaryrefslogtreecommitdiff
path: root/test/anki-note-builder.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/anki-note-builder.test.js')
-rw-r--r--test/anki-note-builder.test.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/anki-note-builder.test.js b/test/anki-note-builder.test.js
index e4af7943..96dacab6 100644
--- a/test/anki-note-builder.test.js
+++ b/test/anki-note-builder.test.js
@@ -26,12 +26,14 @@ import {TranslatorVM} from '../dev/translator-vm.js';
import {AnkiNoteBuilder} from '../ext/js/data/anki-note-builder.js';
import {JapaneseUtil} from '../ext/js/language/sandbox/japanese-util.js';
+const dirname = path.dirname(fileURLToPath(import.meta.url));
+
/**
* @param {string} url2
* @returns {Promise<import('dev/vm').PseudoFetchResponse>}
*/
async function fetch(url2) {
- const extDir = path.join(__dirname, '..', 'ext');
+ const extDir = path.join(dirname, '..', 'ext');
let filePath;
try {
filePath = url.fileURLToPath(url2);
@@ -51,8 +53,6 @@ async function fetch(url2) {
vi.stubGlobal('fetch', fetch);
vi.mock('../ext/js/templates/template-renderer-proxy.js');
-const dirname = path.dirname(fileURLToPath(import.meta.url));
-
/**
* @returns {Promise<TranslatorVM>}
*/