Merge branch 'feature/signature-field-and-component' of github.com:Budibase/budibase into feature/signature-field-and-component

This commit is contained in:
Andrew Kingston 2024-05-20 11:53:35 +01:00
commit 377d7fdb76
1 changed files with 3 additions and 3 deletions

View File

@ -19,9 +19,10 @@ import {
} from "@budibase/types" } from "@budibase/types"
import _ from "lodash" import _ from "lodash"
import tk from "timekeeper" import tk from "timekeeper"
import { mocks } from "@budibase/backend-core/tests"
import { encodeJSBinding } from "@budibase/string-templates" import { encodeJSBinding } from "@budibase/string-templates"
const serverTime = new Date("2024-05-06T00:00:00.000Z") const serverTime = mocks.date.MOCK_DATE
tk.freeze(serverTime) tk.freeze(serverTime)
describe.each([ describe.each([
@ -407,8 +408,7 @@ describe.each([
}) })
it("should parse the encoded js binding. Return rows with appointments 2 weeks in the past", async () => { it("should parse the encoded js binding. Return rows with appointments 2 weeks in the past", async () => {
const jsBinding = const jsBinding = `const currentTime = new Date(${Date.now()})\ncurrentTime.setDate(currentTime.getDate()-14);\nreturn currentTime.toISOString();`
"const currentTime = new Date()\ncurrentTime.setDate(currentTime.getDate()-14);\nreturn currentTime.toISOString();"
const encodedBinding = encodeJSBinding(jsBinding) const encodedBinding = encodeJSBinding(jsBinding)
await expectQuery({ await expectQuery({