Skip to content

Commit

Permalink
Added more tests for homework and timetable
Browse files Browse the repository at this point in the history
  • Loading branch information
chopster44 committed Mar 13, 2023
1 parent 622798a commit 48e107f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 48e107f

Please sign in to comment.