Resetting timekeeper and resetting pro back to normal.

This commit is contained in:
mike12345567 2023-10-31 11:19:53 +00:00
parent 15b1f3efe6
commit 88cc8a19ee
4 changed files with 2 additions and 9 deletions

View File

@ -1,7 +1,3 @@
export const MOCK_DATE = new Date("2020-01-01T00:00:00.000Z")
export const MOCK_DATE_PLUS = (ms: number) => {
return new Date(Date.now() + ms)
}
export const MOCK_DATE_TIMESTAMP = 1577836800000

@ -1 +1 @@
Subproject commit 132b080643f0b1ef1488bb8362d1c41ea0bd263f
Subproject commit 3820c0c93a3e448e10a60a9feb5396844b537ca8

View File

@ -14,6 +14,7 @@ describe("/backups", () => {
afterAll(setup.afterAll)
beforeEach(async () => {
tk.reset()
await config.init()
})

View File

@ -4,8 +4,6 @@ import {
} from "@budibase/types"
import TestConfiguration from "../TestConfiguration"
import { TestAPI } from "./base"
import tk from "timekeeper"
import { mocks } from "@budibase/backend-core/tests"
export class BackupAPI extends TestAPI {
constructor(config: TestConfiguration) {
@ -25,7 +23,6 @@ export class BackupAPI extends TestAPI {
}
createBackup = async (appId: string) => {
tk.freeze(mocks.date.MOCK_DATE_PLUS(1))
const result = await this.request
.post(`/api/apps/${appId}/backups`)
.set(this.config.defaultHeaders())
@ -38,7 +35,6 @@ export class BackupAPI extends TestAPI {
appId: string,
backupId: string
): Promise<ImportAppBackupResponse> => {
tk.freeze(mocks.date.MOCK_DATE_PLUS(1))
const result = await this.request
.post(`/api/apps/${appId}/backups/${backupId}/import`)
.set(this.config.defaultHeaders())