Skip to content

Commit

Permalink
tests: add back schema tests
Browse files Browse the repository at this point in the history
  • Loading branch information
debater-coder committed Oct 25, 2023
1 parent e4452a4 commit 0b95b8a
Show file tree
Hide file tree
Showing 5 changed files with 3,496 additions and 248 deletions.
192 changes: 192 additions & 0 deletions apps/client/src/consumers/sbhsApi/__snapshots__/useDtt.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`the schema > parses a day timetable with no periods 1`] = `
{
"date": "2023-09-20T00:00:00.000+10:00",
"periods": [
{
"date": "2023-09-20",
"endTime": "2023-09-20T08:00:00.000+10:00",
"key": "0-transition",
"name": "Transition to Period 0",
"shortName": "transition",
"startTime": "2023-09-20T00:00:00.000+10:00",
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T08:57:00.000+10:00",
"key": "0",
"name": "Period 0",
"room": undefined,
"roomTo": undefined,
"shortName": "0",
"startTime": "2023-09-20T08:00:00.000+10:00",
"teacher": undefined,
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T09:00:00.000+10:00",
"key": "RC",
"name": "Roll Call",
"room": undefined,
"roomTo": undefined,
"shortName": "RC",
"startTime": "2023-09-20T08:57:00.000+10:00",
"teacher": undefined,
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T10:00:00.000+10:00",
"key": "1",
"name": "Period 1",
"room": undefined,
"roomTo": undefined,
"shortName": "1",
"startTime": "2023-09-20T09:00:00.000+10:00",
"teacher": undefined,
},
{
"date": "2023-09-20",
"endTime": "2023-09-20T10:05:00.000+10:00",
"key": "2-transition",
"name": "Transition to Period 2",
"shortName": "transition",
"startTime": "2023-09-20T10:00:00.000+10:00",
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T11:05:00.000+10:00",
"key": "2",
"name": "Period 2",
"room": undefined,
"roomTo": undefined,
"shortName": "2",
"startTime": "2023-09-20T10:05:00.000+10:00",
"teacher": undefined,
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T11:22:00.000+10:00",
"key": "R",
"name": "Recess",
"room": undefined,
"roomTo": undefined,
"shortName": "R",
"startTime": "2023-09-20T11:05:00.000+10:00",
"teacher": undefined,
},
{
"date": "2023-09-20",
"endTime": "2023-09-20T11:25:00.000+10:00",
"key": "3-transition",
"name": "Transition to Period 3",
"shortName": "transition",
"startTime": "2023-09-20T11:22:00.000+10:00",
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T12:25:00.000+10:00",
"key": "3",
"name": "Period 3",
"room": undefined,
"roomTo": undefined,
"shortName": "3",
"startTime": "2023-09-20T11:25:00.000+10:00",
"teacher": undefined,
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T12:45:00.000+10:00",
"key": "WFL1",
"name": "Lunch 1",
"room": undefined,
"roomTo": undefined,
"shortName": "WFL1",
"startTime": "2023-09-20T12:25:00.000+10:00",
"teacher": undefined,
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T13:02:00.000+10:00",
"key": "WFL2",
"name": "Lunch 2",
"room": undefined,
"roomTo": undefined,
"shortName": "WFL2",
"startTime": "2023-09-20T12:45:00.000+10:00",
"teacher": undefined,
},
{
"date": "2023-09-20",
"endTime": "2023-09-20T13:05:00.000+10:00",
"key": "4-transition",
"name": "Transition to Period 4",
"shortName": "transition",
"startTime": "2023-09-20T13:02:00.000+10:00",
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T14:05:00.000+10:00",
"key": "4",
"name": "Period 4",
"room": undefined,
"roomTo": undefined,
"shortName": "4",
"startTime": "2023-09-20T13:05:00.000+10:00",
"teacher": undefined,
},
{
"date": "2023-09-20",
"endTime": "2023-09-20T14:10:00.000+10:00",
"key": "5-transition",
"name": "Transition to Period 5",
"shortName": "transition",
"startTime": "2023-09-20T14:05:00.000+10:00",
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": "2023-09-20T15:10:00.000+10:00",
"key": "5",
"name": "Period 5",
"room": undefined,
"roomTo": undefined,
"shortName": "5",
"startTime": "2023-09-20T14:10:00.000+10:00",
"teacher": undefined,
},
{
"casual": undefined,
"colour": "transparent",
"date": "2023-09-20",
"endTime": null,
"key": "EoD",
"name": "End of Day",
"room": undefined,
"roomTo": undefined,
"shortName": "EoD",
"startTime": "2023-09-20T15:10:00.000+10:00",
"teacher": undefined,
},
],
}
`;
Loading

0 comments on commit 0b95b8a

Please sign in to comment.