setup tests for client time zone offset

This commit is contained in:
Moriz Wahl 2022-11-15 14:09:33 +01:00
parent fbc1b2bc32
commit b7cf290171

View File

@ -16,7 +16,7 @@ const context = {
push: headerPushMock, push: headerPushMock,
forEach: jest.fn(), forEach: jest.fn(),
}, },
clientRequestTime: '', clientTimezoneOffset: 0,
} }
export const cleanDB = async () => { export const cleanDB = async () => {
@ -52,3 +52,7 @@ export const resetToken = () => {
export const contributionDateFormatter = (date: Date): string => { export const contributionDateFormatter = (date: Date): string => {
return `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}` return `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`
} }
export const setClientTimezoneOffset = (offset: number): void => {
context.clientTimezoneOffset = offset
}