From 48e107f54ca72bf6952010cb3c05870bacf3bc4d Mon Sep 17 00:00:00 2001 From: chopster44 Date: Mon, 13 Mar 2023 20:14:05 +0000 Subject: [PATCH] Added more tests for homework and timetable --- src/tests/index.test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/tests/index.test.ts b/src/tests/index.test.ts index 30f36a9..e9b9888 100644 --- a/src/tests/index.test.ts +++ b/src/tests/index.test.ts @@ -31,6 +31,24 @@ async function main () { if (!today.is_current) { throw new Error("Timetable Error: today is not today"); } + + let rawHomework: EdulinkTypes.ResultTypes.RawHomeworkResult = await edulinkTest.getRawHomework({data: { + format: 2 + } + }); + if (rawHomework == undefined) { + throw new Error("Homework Error: out from homework is undefined"); + } + + let currentHomework = await edulinkTest.getCurrentHomework(); + if (currentHomework == undefined) { + throw new Error("Homework Error: out from current homework is undefined"); + } + + let pastHomework = await edulinkTest.getCurrentHomework(); + if (pastHomework == undefined) { + throw new Error("Homework Error: out from past homework is undefined"); + } } try {