aboutsummaryrefslogtreecommitdiff
path: root/test/reading
diff options
context:
space:
mode:
Diffstat (limited to 'test/reading')
-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}`);