aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-06-29 23:25:01 +0200
committerlonkaars <loek@pipeframe.xyz>2023-06-29 23:25:01 +0200
commitcc5689eaf4f7cfa158e31107906434da9aed62bf (patch)
treef02bb5f0887a48de32b9b06b6500c158043f0c52 /test
parentccd4760cc28082c2d7d9bbebd1a60fe7da65d121 (diff)
WIP examples + change `.prepare()` to `await .ready`
Diffstat (limited to 'test')
-rw-r--r--test/reading/test.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/reading/test.ts b/test/reading/test.ts
index 9d426d4..9caf890 100644
--- a/test/reading/test.ts
+++ b/test/reading/test.ts
@@ -17,7 +17,8 @@ interface Test {
tags: Array<string>;
};
-const tests = JSON.parse(await Deno.readTextFile(path.resolve('test', 'reading', 'cases.json'))) as Test[];
+const here = path.dirname(path.fromFileUrl(import.meta.url));
+const tests = JSON.parse(await Deno.readTextFile(path.resolve(here, 'cases.json'))) as Test[];
console.log(`amount of sentences: ${tests.length}`);
console.log(`average sentence length: ${tests.map(t => t.test.input.length).reduce((a, b) => a + b) / tests.length}`);