aboutsummaryrefslogtreecommitdiff
path: root/test/anki-note-builder.test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-30 20:00:46 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-30 20:00:46 -0500
commit338d210b66006189a0b775e8bd524c1cc11c2d9a (patch)
tree12fbd7eb03dcbb7ffcf270a1e7f9a8ee0cf53996 /test/anki-note-builder.test.js
parent43bc4e3015a7b6c4f4941c4b6327a7445b356f1c (diff)
Update paths
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>}
*/