1
0
Fork 0
mirror of synced 2024-08-07 22:28:15 +12:00

Adding negative test case and fixing build issue.

This commit is contained in:
mike12345567 2023-10-06 12:16:37 +01:00
parent 3de8c53166
commit dc50515bcc
2 changed files with 5 additions and 2 deletions

View file

@ -37,13 +37,16 @@ describe("searchInputMapping", () => {
})
it("shouldn't change any other input", () => {
const email = "test@test.com"
const params: SearchParams = {
tableId,
query: {
equal: {
"1:user": "test@test.com",
"1:user": email,
},
},
}
const output = searchInputMapping(tableWithUserCol, params)
expect(output.query.equal!["1:user"]).toBe(email)
})
})

View file

@ -11,7 +11,7 @@ import { db as dbCore } from "@budibase/backend-core"
function findColumnInQueries(
column: string,
options: SearchParams,
callback: <T>(filter: T) => T
callback: (filter: any) => any
) {
for (let filterBlock of Object.values(options.query)) {
if (typeof filterBlock !== "object") {