mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-07 04:09:17 +02:00
feat/#3 change tests to run in UTC time (not working on my machine)
This commit is contained in:
@@ -504,7 +504,7 @@ describe("RoomOccupancyList", () => {
|
|||||||
const shiftedTime = RoomOccupancyList["shiftTimeForwardInsideWorkday"](startTime);
|
const shiftedTime = RoomOccupancyList["shiftTimeForwardInsideWorkday"](startTime);
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-01T23:00:00Z"));
|
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T00:00:00Z"));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("don't shift time on the same day", () => {
|
test("don't shift time on the same day", () => {
|
||||||
@@ -515,7 +515,7 @@ describe("RoomOccupancyList", () => {
|
|||||||
const shiftedTime = RoomOccupancyList["shiftTimeForwardInsideWorkday"](startTime);
|
const shiftedTime = RoomOccupancyList["shiftTimeForwardInsideWorkday"](startTime);
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T01:00:00Z"));
|
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T02:00:00Z"));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("don't shift if already inside workday", () => {
|
test("don't shift if already inside workday", () => {
|
||||||
@@ -526,7 +526,7 @@ describe("RoomOccupancyList", () => {
|
|||||||
const shiftedTime = RoomOccupancyList["shiftTimeForwardInsideWorkday"](startTime);
|
const shiftedTime = RoomOccupancyList["shiftTimeForwardInsideWorkday"](startTime);
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T12:30:00Z"));
|
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T13:30:00Z"));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -539,7 +539,7 @@ describe("RoomOccupancyList", () => {
|
|||||||
const shiftedTime = RoomOccupancyList["shiftTimeBackwardInsideWorkday"](startTime);
|
const shiftedTime = RoomOccupancyList["shiftTimeBackwardInsideWorkday"](startTime);
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-01T22:59:59.999Z"));
|
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-01T23:59:59.999Z"));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("don't shift time on the same day", () => {
|
test("don't shift time on the same day", () => {
|
||||||
@@ -550,7 +550,7 @@ describe("RoomOccupancyList", () => {
|
|||||||
const shiftedTime = RoomOccupancyList["shiftTimeBackwardInsideWorkday"](startTime);
|
const shiftedTime = RoomOccupancyList["shiftTimeBackwardInsideWorkday"](startTime);
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T22:00:00Z"));
|
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T23:00:00Z"));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("don't shift if already inside workday", () => {
|
test("don't shift if already inside workday", () => {
|
||||||
@@ -561,7 +561,7 @@ describe("RoomOccupancyList", () => {
|
|||||||
const shiftedTime = RoomOccupancyList["shiftTimeBackwardInsideWorkday"](startTime);
|
const shiftedTime = RoomOccupancyList["shiftTimeBackwardInsideWorkday"](startTime);
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T12:30:00Z"));
|
expect(toZonedTime(shiftedTime, localTimezone)).toEqual(new Date("2022-01-02T13:30:00Z"));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user